| 392 | } |
| 393 | |
| 394 | static void printCompatibleScreens(ResXMLTree& tree) { |
| 395 | size_t len; |
| 396 | ResXMLTree::event_code_t code; |
| 397 | int depth = 0; |
| 398 | bool first = true; |
| 399 | printf("compatible-screens:"); |
| 400 | while ((code=tree.next()) != ResXMLTree::END_DOCUMENT && code != ResXMLTree::BAD_DOCUMENT) { |
| 401 | if (code == ResXMLTree::END_TAG) { |
| 402 | depth--; |
| 403 | if (depth < 0) { |
| 404 | break; |
| 405 | } |
| 406 | continue; |
| 407 | } |
| 408 | if (code != ResXMLTree::START_TAG) { |
| 409 | continue; |
| 410 | } |
| 411 | depth++; |
| 412 | String8 tag(tree.getElementName(&len)); |
| 413 | if (tag == "screen") { |
| 414 | int32_t screenSize = getIntegerAttribute(tree, |
| 415 | SCREEN_SIZE_ATTR, NULL, -1); |
| 416 | int32_t screenDensity = getIntegerAttribute(tree, |
| 417 | SCREEN_DENSITY_ATTR, NULL, -1); |
| 418 | if (screenSize > 0 && screenDensity > 0) { |
| 419 | if (!first) { |
| 420 | printf(","); |
| 421 | } |
| 422 | first = false; |
| 423 | printf("'%d/%d'", screenSize, screenDensity); |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | printf("\n"); |
| 428 | } |
| 429 | |
| 430 | Vector<String8> getNfcAidCategories(AssetManager& assets, String8 xmlPath, bool offHost, |
| 431 | String8 *outError = NULL) |
no test coverage detected