Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,7 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int roundIcon = 16844083; // 0x1010533 field public static final int rowCount = 16843637; // 0x1010375 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241 api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1146,6 +1146,7 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int roundIcon = 16844083; // 0x1010533 field public static final int rowCount = 16843637; // 0x1010375 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241 api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,7 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int roundIcon = 16844083; // 0x1010533 field public static final int rowCount = 16843637; // 0x1010375 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241 core/java/android/content/pm/PackageParser.java +69 −75 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ public class PackageParser { final int nameRes; final int labelRes; final int iconRes; final int roundIconRes; final int logoRes; final int bannerRes; Loading @@ -277,7 +278,8 @@ public class PackageParser { TypedArray sa; ParsePackageItemArgs(Package _owner, String[] _outError, int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes) { int _nameRes, int _labelRes, int _iconRes, int _roundIconRes, int _logoRes, int _bannerRes) { owner = _owner; outError = _outError; nameRes = _nameRes; Loading @@ -285,6 +287,7 @@ public class PackageParser { iconRes = _iconRes; logoRes = _logoRes; bannerRes = _bannerRes; roundIconRes = _roundIconRes; } } Loading @@ -296,10 +299,12 @@ public class PackageParser { int flags; ParseComponentArgs(Package _owner, String[] _outError, int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes, int _nameRes, int _labelRes, int _iconRes, int _roundIconRes, int _logoRes, int _bannerRes, String[] _sepProcesses, int _processRes, int _descriptionRes, int _enabledRes) { super(_owner, _outError, _nameRes, _labelRes, _iconRes, _logoRes, _bannerRes); super(_owner, _outError, _nameRes, _labelRes, _iconRes, _roundIconRes, _logoRes, _bannerRes); sepProcesses = _sepProcesses; processRes = _processRes; descriptionRes = _descriptionRes; Loading Loading @@ -2508,10 +2513,11 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestPermissionGroup); if (!parsePackageItemInfo(owner, perm.info, outError, "<permission-group>", sa, "<permission-group>", sa, true /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestPermissionGroup_name, com.android.internal.R.styleable.AndroidManifestPermissionGroup_label, com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon, com.android.internal.R.styleable.AndroidManifestPermissionGroup_roundIcon, com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo, com.android.internal.R.styleable.AndroidManifestPermissionGroup_banner)) { sa.recycle(); Loading Loading @@ -2552,10 +2558,11 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestPermission); if (!parsePackageItemInfo(owner, perm.info, outError, "<permission>", sa, "<permission>", sa, true /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestPermission_name, com.android.internal.R.styleable.AndroidManifestPermission_label, com.android.internal.R.styleable.AndroidManifestPermission_icon, com.android.internal.R.styleable.AndroidManifestPermission_roundIcon, com.android.internal.R.styleable.AndroidManifestPermission_logo, com.android.internal.R.styleable.AndroidManifestPermission_banner)) { sa.recycle(); Loading Loading @@ -2621,10 +2628,11 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestPermissionTree); if (!parsePackageItemInfo(owner, perm.info, outError, "<permission-tree>", sa, "<permission-tree>", sa, true /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestPermissionTree_name, com.android.internal.R.styleable.AndroidManifestPermissionTree_label, com.android.internal.R.styleable.AndroidManifestPermissionTree_icon, com.android.internal.R.styleable.AndroidManifestPermissionTree_roundIcon, com.android.internal.R.styleable.AndroidManifestPermissionTree_logo, com.android.internal.R.styleable.AndroidManifestPermissionTree_banner)) { sa.recycle(); Loading Loading @@ -2671,6 +2679,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestInstrumentation_name, com.android.internal.R.styleable.AndroidManifestInstrumentation_label, com.android.internal.R.styleable.AndroidManifestInstrumentation_icon, com.android.internal.R.styleable.AndroidManifestInstrumentation_roundIcon, com.android.internal.R.styleable.AndroidManifestInstrumentation_logo, com.android.internal.R.styleable.AndroidManifestInstrumentation_banner); mParseInstrumentationArgs.tag = "<instrumentation>"; Loading Loading @@ -2736,10 +2745,21 @@ public class PackageParser { TypedArray sa = res.obtainAttributes(parser, com.android.internal.R.styleable.AndroidManifestApplication); String name = sa.getNonConfigurationString( com.android.internal.R.styleable.AndroidManifestApplication_name, 0); if (name != null) { ai.className = buildClassName(pkgName, name, outError); if (!parsePackageItemInfo(owner, ai, outError, "<application>", sa, false /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestApplication_name, com.android.internal.R.styleable.AndroidManifestApplication_label, com.android.internal.R.styleable.AndroidManifestApplication_icon, com.android.internal.R.styleable.AndroidManifestApplication_roundIcon, com.android.internal.R.styleable.AndroidManifestApplication_logo, com.android.internal.R.styleable.AndroidManifestApplication_banner)) { sa.recycle(); mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED; return false; } if (ai.name != null) { ai.className = buildClassName(pkgName, ai.name, outError); if (ai.className == null) { sa.recycle(); mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED; Loading Loading @@ -2810,18 +2830,6 @@ public class PackageParser { } } TypedValue v = sa.peekValue( com.android.internal.R.styleable.AndroidManifestApplication_label); if (v != null && (ai.labelRes=v.resourceId) == 0) { ai.nonLocalizedLabel = v.coerceToString(); } ai.icon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_icon, 0); ai.logo = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_logo, 0); ai.banner = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_banner, 0); ai.theme = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_theme, 0); ai.descriptionRes = sa.getResourceId( Loading Loading @@ -3335,26 +3343,34 @@ public class PackageParser { return true; } private boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo, String[] outError, String tag, TypedArray sa, int nameRes, int labelRes, int iconRes, int logoRes, int bannerRes) { private static boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo, String[] outError, String tag, TypedArray sa, boolean nameRequired, int nameRes, int labelRes, int iconRes, int roundIconRes, int logoRes, int bannerRes) { String name = sa.getNonConfigurationString(nameRes, 0); if (name == null) { if (nameRequired) { outError[0] = tag + " does not specify android:name"; return false; } } else { outInfo.name = buildClassName(owner.applicationInfo.packageName, name, outError); if (outInfo.name == null) { return false; } } int roundIconVal = sa.getResourceId(roundIconRes, 0); if (roundIconVal != 0) { outInfo.icon = roundIconVal; outInfo.nonLocalizedLabel = null; } else { int iconVal = sa.getResourceId(iconRes, 0); if (iconVal != 0) { outInfo.icon = iconVal; outInfo.nonLocalizedLabel = null; } } int logoVal = sa.getResourceId(logoRes, 0); if (logoVal != 0) { Loading Loading @@ -3387,6 +3403,7 @@ public class PackageParser { R.styleable.AndroidManifestActivity_name, R.styleable.AndroidManifestActivity_label, R.styleable.AndroidManifestActivity_icon, R.styleable.AndroidManifestActivity_roundIcon, R.styleable.AndroidManifestActivity_logo, R.styleable.AndroidManifestActivity_banner, mSeparateProcesses, Loading Loading @@ -3761,6 +3778,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestActivityAlias_name, com.android.internal.R.styleable.AndroidManifestActivityAlias_label, com.android.internal.R.styleable.AndroidManifestActivityAlias_icon, com.android.internal.R.styleable.AndroidManifestActivityAlias_roundIcon, com.android.internal.R.styleable.AndroidManifestActivityAlias_logo, com.android.internal.R.styleable.AndroidManifestActivityAlias_banner, mSeparateProcesses, Loading Loading @@ -3915,6 +3933,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestProvider_name, com.android.internal.R.styleable.AndroidManifestProvider_label, com.android.internal.R.styleable.AndroidManifestProvider_icon, com.android.internal.R.styleable.AndroidManifestProvider_roundIcon, com.android.internal.R.styleable.AndroidManifestProvider_logo, com.android.internal.R.styleable.AndroidManifestProvider_banner, mSeparateProcesses, Loading Loading @@ -4234,6 +4253,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestService_name, com.android.internal.R.styleable.AndroidManifestService_label, com.android.internal.R.styleable.AndroidManifestService_icon, com.android.internal.R.styleable.AndroidManifestService_roundIcon, com.android.internal.R.styleable.AndroidManifestService_logo, com.android.internal.R.styleable.AndroidManifestService_banner, mSeparateProcesses, Loading Loading @@ -4550,8 +4570,14 @@ public class PackageParser { outInfo.nonLocalizedLabel = v.coerceToString(); } int roundIcon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestIntentFilter_roundIcon, 0); if (roundIcon != 0) { outInfo.icon = roundIcon; } else { outInfo.icon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestIntentFilter_icon, 0); } outInfo.logo = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestIntentFilter_logo, 0); Loading Loading @@ -5180,45 +5206,13 @@ public class PackageParser { public Component(final ParsePackageItemArgs args, final PackageItemInfo outInfo) { owner = args.owner; intents = new ArrayList<II>(0); String name = args.sa.getNonConfigurationString(args.nameRes, 0); if (name == null) { className = null; args.outError[0] = args.tag + " does not specify android:name"; return; } outInfo.name = buildClassName(owner.applicationInfo.packageName, name, args.outError); if (outInfo.name == null) { className = null; args.outError[0] = args.tag + " does not have valid android:name"; return; } if (parsePackageItemInfo(args.owner, outInfo, args.outError, args.tag, args.sa, true /*nameRequired*/, args.nameRes, args.labelRes, args.iconRes, args.roundIconRes, args.logoRes, args.bannerRes)) { className = outInfo.name; int iconVal = args.sa.getResourceId(args.iconRes, 0); if (iconVal != 0) { outInfo.icon = iconVal; outInfo.nonLocalizedLabel = null; } int logoVal = args.sa.getResourceId(args.logoRes, 0); if (logoVal != 0) { outInfo.logo = logoVal; } int bannerVal = args.sa.getResourceId(args.bannerRes, 0); if (bannerVal != 0) { outInfo.banner = bannerVal; } TypedValue v = args.sa.peekValue(args.labelRes); if (v != null && (outInfo.labelRes=v.resourceId) == 0) { outInfo.nonLocalizedLabel = v.coerceToString(); } else { className = null; } outInfo.packageName = owner.packageName; } public Component(final ParseComponentArgs args, final ComponentInfo outInfo) { Loading core/res/res/values/attrs_manifest.xml +25 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,20 @@ a reference to a Drawable resource containing the image definition. --> <attr name="icon" format="reference" /> <!-- A Drawable resource providing a graphical representation of its associated item. Use with the application tag (to supply a default round icon for all application components), or with the activity, receiver, service, or instrumentation tag (to supply a specific round icon for that component). It may also be used with the intent-filter tag to supply a round icon to show to the user when an activity is being selected based on a particular Intent. <p>The given round icon will be used to display to the user a graphical representation of its associated component; for example, as the round icon for main activity that is displayed in the launcher. This must be a reference to a Drawable resource containing the image definition. --> <attr name="roundIcon" format="reference" /> <!-- A Drawable resource providing an extended graphical banner for its associated item. Use with the application tag (to supply a default banner for all application activities), or with the activity, tag to Loading Loading @@ -1236,6 +1250,7 @@ <attr name="theme" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="description" /> Loading Loading @@ -1335,6 +1350,7 @@ <attr name="name" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permissionGroup" /> Loading Loading @@ -1362,6 +1378,7 @@ <attr name="name" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="description" /> Loading Loading @@ -1395,6 +1412,7 @@ <attr name="name" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> </declare-styleable> Loading Loading @@ -1676,6 +1694,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="process" /> Loading Loading @@ -1759,6 +1778,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permission" /> Loading Loading @@ -1807,6 +1827,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permission" /> Loading Loading @@ -1843,6 +1864,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="launchMode" /> Loading Loading @@ -1926,6 +1948,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permission" /> Loading Loading @@ -1998,6 +2021,7 @@ parent="AndroidManifestActivity AndroidManifestReceiver AndroidManifestService"> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="priority" /> Loading Loading @@ -2128,6 +2152,7 @@ <attr name="targetPackage" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="handleProfiling" /> Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,7 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int roundIcon = 16844083; // 0x1010533 field public static final int rowCount = 16843637; // 0x1010375 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1146,6 +1146,7 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int roundIcon = 16844083; // 0x1010533 field public static final int rowCount = 16843637; // 0x1010375 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1040,6 +1040,7 @@ package android { field public static final int rotation = 16843558; // 0x1010326 field public static final int rotationX = 16843559; // 0x1010327 field public static final int rotationY = 16843560; // 0x1010328 field public static final int roundIcon = 16844083; // 0x1010533 field public static final int rowCount = 16843637; // 0x1010375 field public static final int rowDelay = 16843216; // 0x10101d0 field public static final int rowEdgeFlags = 16843329; // 0x1010241
core/java/android/content/pm/PackageParser.java +69 −75 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ public class PackageParser { final int nameRes; final int labelRes; final int iconRes; final int roundIconRes; final int logoRes; final int bannerRes; Loading @@ -277,7 +278,8 @@ public class PackageParser { TypedArray sa; ParsePackageItemArgs(Package _owner, String[] _outError, int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes) { int _nameRes, int _labelRes, int _iconRes, int _roundIconRes, int _logoRes, int _bannerRes) { owner = _owner; outError = _outError; nameRes = _nameRes; Loading @@ -285,6 +287,7 @@ public class PackageParser { iconRes = _iconRes; logoRes = _logoRes; bannerRes = _bannerRes; roundIconRes = _roundIconRes; } } Loading @@ -296,10 +299,12 @@ public class PackageParser { int flags; ParseComponentArgs(Package _owner, String[] _outError, int _nameRes, int _labelRes, int _iconRes, int _logoRes, int _bannerRes, int _nameRes, int _labelRes, int _iconRes, int _roundIconRes, int _logoRes, int _bannerRes, String[] _sepProcesses, int _processRes, int _descriptionRes, int _enabledRes) { super(_owner, _outError, _nameRes, _labelRes, _iconRes, _logoRes, _bannerRes); super(_owner, _outError, _nameRes, _labelRes, _iconRes, _roundIconRes, _logoRes, _bannerRes); sepProcesses = _sepProcesses; processRes = _processRes; descriptionRes = _descriptionRes; Loading Loading @@ -2508,10 +2513,11 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestPermissionGroup); if (!parsePackageItemInfo(owner, perm.info, outError, "<permission-group>", sa, "<permission-group>", sa, true /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestPermissionGroup_name, com.android.internal.R.styleable.AndroidManifestPermissionGroup_label, com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon, com.android.internal.R.styleable.AndroidManifestPermissionGroup_roundIcon, com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo, com.android.internal.R.styleable.AndroidManifestPermissionGroup_banner)) { sa.recycle(); Loading Loading @@ -2552,10 +2558,11 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestPermission); if (!parsePackageItemInfo(owner, perm.info, outError, "<permission>", sa, "<permission>", sa, true /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestPermission_name, com.android.internal.R.styleable.AndroidManifestPermission_label, com.android.internal.R.styleable.AndroidManifestPermission_icon, com.android.internal.R.styleable.AndroidManifestPermission_roundIcon, com.android.internal.R.styleable.AndroidManifestPermission_logo, com.android.internal.R.styleable.AndroidManifestPermission_banner)) { sa.recycle(); Loading Loading @@ -2621,10 +2628,11 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestPermissionTree); if (!parsePackageItemInfo(owner, perm.info, outError, "<permission-tree>", sa, "<permission-tree>", sa, true /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestPermissionTree_name, com.android.internal.R.styleable.AndroidManifestPermissionTree_label, com.android.internal.R.styleable.AndroidManifestPermissionTree_icon, com.android.internal.R.styleable.AndroidManifestPermissionTree_roundIcon, com.android.internal.R.styleable.AndroidManifestPermissionTree_logo, com.android.internal.R.styleable.AndroidManifestPermissionTree_banner)) { sa.recycle(); Loading Loading @@ -2671,6 +2679,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestInstrumentation_name, com.android.internal.R.styleable.AndroidManifestInstrumentation_label, com.android.internal.R.styleable.AndroidManifestInstrumentation_icon, com.android.internal.R.styleable.AndroidManifestInstrumentation_roundIcon, com.android.internal.R.styleable.AndroidManifestInstrumentation_logo, com.android.internal.R.styleable.AndroidManifestInstrumentation_banner); mParseInstrumentationArgs.tag = "<instrumentation>"; Loading Loading @@ -2736,10 +2745,21 @@ public class PackageParser { TypedArray sa = res.obtainAttributes(parser, com.android.internal.R.styleable.AndroidManifestApplication); String name = sa.getNonConfigurationString( com.android.internal.R.styleable.AndroidManifestApplication_name, 0); if (name != null) { ai.className = buildClassName(pkgName, name, outError); if (!parsePackageItemInfo(owner, ai, outError, "<application>", sa, false /*nameRequired*/, com.android.internal.R.styleable.AndroidManifestApplication_name, com.android.internal.R.styleable.AndroidManifestApplication_label, com.android.internal.R.styleable.AndroidManifestApplication_icon, com.android.internal.R.styleable.AndroidManifestApplication_roundIcon, com.android.internal.R.styleable.AndroidManifestApplication_logo, com.android.internal.R.styleable.AndroidManifestApplication_banner)) { sa.recycle(); mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED; return false; } if (ai.name != null) { ai.className = buildClassName(pkgName, ai.name, outError); if (ai.className == null) { sa.recycle(); mParseError = PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED; Loading Loading @@ -2810,18 +2830,6 @@ public class PackageParser { } } TypedValue v = sa.peekValue( com.android.internal.R.styleable.AndroidManifestApplication_label); if (v != null && (ai.labelRes=v.resourceId) == 0) { ai.nonLocalizedLabel = v.coerceToString(); } ai.icon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_icon, 0); ai.logo = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_logo, 0); ai.banner = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_banner, 0); ai.theme = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestApplication_theme, 0); ai.descriptionRes = sa.getResourceId( Loading Loading @@ -3335,26 +3343,34 @@ public class PackageParser { return true; } private boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo, String[] outError, String tag, TypedArray sa, int nameRes, int labelRes, int iconRes, int logoRes, int bannerRes) { private static boolean parsePackageItemInfo(Package owner, PackageItemInfo outInfo, String[] outError, String tag, TypedArray sa, boolean nameRequired, int nameRes, int labelRes, int iconRes, int roundIconRes, int logoRes, int bannerRes) { String name = sa.getNonConfigurationString(nameRes, 0); if (name == null) { if (nameRequired) { outError[0] = tag + " does not specify android:name"; return false; } } else { outInfo.name = buildClassName(owner.applicationInfo.packageName, name, outError); if (outInfo.name == null) { return false; } } int roundIconVal = sa.getResourceId(roundIconRes, 0); if (roundIconVal != 0) { outInfo.icon = roundIconVal; outInfo.nonLocalizedLabel = null; } else { int iconVal = sa.getResourceId(iconRes, 0); if (iconVal != 0) { outInfo.icon = iconVal; outInfo.nonLocalizedLabel = null; } } int logoVal = sa.getResourceId(logoRes, 0); if (logoVal != 0) { Loading Loading @@ -3387,6 +3403,7 @@ public class PackageParser { R.styleable.AndroidManifestActivity_name, R.styleable.AndroidManifestActivity_label, R.styleable.AndroidManifestActivity_icon, R.styleable.AndroidManifestActivity_roundIcon, R.styleable.AndroidManifestActivity_logo, R.styleable.AndroidManifestActivity_banner, mSeparateProcesses, Loading Loading @@ -3761,6 +3778,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestActivityAlias_name, com.android.internal.R.styleable.AndroidManifestActivityAlias_label, com.android.internal.R.styleable.AndroidManifestActivityAlias_icon, com.android.internal.R.styleable.AndroidManifestActivityAlias_roundIcon, com.android.internal.R.styleable.AndroidManifestActivityAlias_logo, com.android.internal.R.styleable.AndroidManifestActivityAlias_banner, mSeparateProcesses, Loading Loading @@ -3915,6 +3933,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestProvider_name, com.android.internal.R.styleable.AndroidManifestProvider_label, com.android.internal.R.styleable.AndroidManifestProvider_icon, com.android.internal.R.styleable.AndroidManifestProvider_roundIcon, com.android.internal.R.styleable.AndroidManifestProvider_logo, com.android.internal.R.styleable.AndroidManifestProvider_banner, mSeparateProcesses, Loading Loading @@ -4234,6 +4253,7 @@ public class PackageParser { com.android.internal.R.styleable.AndroidManifestService_name, com.android.internal.R.styleable.AndroidManifestService_label, com.android.internal.R.styleable.AndroidManifestService_icon, com.android.internal.R.styleable.AndroidManifestService_roundIcon, com.android.internal.R.styleable.AndroidManifestService_logo, com.android.internal.R.styleable.AndroidManifestService_banner, mSeparateProcesses, Loading Loading @@ -4550,8 +4570,14 @@ public class PackageParser { outInfo.nonLocalizedLabel = v.coerceToString(); } int roundIcon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestIntentFilter_roundIcon, 0); if (roundIcon != 0) { outInfo.icon = roundIcon; } else { outInfo.icon = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestIntentFilter_icon, 0); } outInfo.logo = sa.getResourceId( com.android.internal.R.styleable.AndroidManifestIntentFilter_logo, 0); Loading Loading @@ -5180,45 +5206,13 @@ public class PackageParser { public Component(final ParsePackageItemArgs args, final PackageItemInfo outInfo) { owner = args.owner; intents = new ArrayList<II>(0); String name = args.sa.getNonConfigurationString(args.nameRes, 0); if (name == null) { className = null; args.outError[0] = args.tag + " does not specify android:name"; return; } outInfo.name = buildClassName(owner.applicationInfo.packageName, name, args.outError); if (outInfo.name == null) { className = null; args.outError[0] = args.tag + " does not have valid android:name"; return; } if (parsePackageItemInfo(args.owner, outInfo, args.outError, args.tag, args.sa, true /*nameRequired*/, args.nameRes, args.labelRes, args.iconRes, args.roundIconRes, args.logoRes, args.bannerRes)) { className = outInfo.name; int iconVal = args.sa.getResourceId(args.iconRes, 0); if (iconVal != 0) { outInfo.icon = iconVal; outInfo.nonLocalizedLabel = null; } int logoVal = args.sa.getResourceId(args.logoRes, 0); if (logoVal != 0) { outInfo.logo = logoVal; } int bannerVal = args.sa.getResourceId(args.bannerRes, 0); if (bannerVal != 0) { outInfo.banner = bannerVal; } TypedValue v = args.sa.peekValue(args.labelRes); if (v != null && (outInfo.labelRes=v.resourceId) == 0) { outInfo.nonLocalizedLabel = v.coerceToString(); } else { className = null; } outInfo.packageName = owner.packageName; } public Component(final ParseComponentArgs args, final ComponentInfo outInfo) { Loading
core/res/res/values/attrs_manifest.xml +25 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,20 @@ a reference to a Drawable resource containing the image definition. --> <attr name="icon" format="reference" /> <!-- A Drawable resource providing a graphical representation of its associated item. Use with the application tag (to supply a default round icon for all application components), or with the activity, receiver, service, or instrumentation tag (to supply a specific round icon for that component). It may also be used with the intent-filter tag to supply a round icon to show to the user when an activity is being selected based on a particular Intent. <p>The given round icon will be used to display to the user a graphical representation of its associated component; for example, as the round icon for main activity that is displayed in the launcher. This must be a reference to a Drawable resource containing the image definition. --> <attr name="roundIcon" format="reference" /> <!-- A Drawable resource providing an extended graphical banner for its associated item. Use with the application tag (to supply a default banner for all application activities), or with the activity, tag to Loading Loading @@ -1236,6 +1250,7 @@ <attr name="theme" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="description" /> Loading Loading @@ -1335,6 +1350,7 @@ <attr name="name" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permissionGroup" /> Loading Loading @@ -1362,6 +1378,7 @@ <attr name="name" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="description" /> Loading Loading @@ -1395,6 +1412,7 @@ <attr name="name" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> </declare-styleable> Loading Loading @@ -1676,6 +1694,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="process" /> Loading Loading @@ -1759,6 +1778,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permission" /> Loading Loading @@ -1807,6 +1827,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permission" /> Loading Loading @@ -1843,6 +1864,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="launchMode" /> Loading Loading @@ -1926,6 +1948,7 @@ <attr name="label" /> <attr name="description" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="permission" /> Loading Loading @@ -1998,6 +2021,7 @@ parent="AndroidManifestActivity AndroidManifestReceiver AndroidManifestService"> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="priority" /> Loading Loading @@ -2128,6 +2152,7 @@ <attr name="targetPackage" /> <attr name="label" /> <attr name="icon" /> <attr name="roundIcon" /> <attr name="banner" /> <attr name="logo" /> <attr name="handleProfiling" /> Loading