Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -704,6 +704,7 @@ package android { field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e field public static final int hardwareAccelerated = 16843475; // 0x10102d3 field public static final int hasCode = 16842764; // 0x101000c field public static final int hasFragileUserData = 16844192; // 0x10105a0 field public static final deprecated int headerAmPmTextAppearance = 16843936; // 0x10104a0 field public static final int headerBackground = 16843055; // 0x101012f field public static final deprecated int headerDayOfMonthTextAppearance = 16843927; // 0x1010497 core/java/android/content/pm/ApplicationInfo.java +19 −0 Original line number Diff line number Diff line Loading @@ -631,6 +631,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int PRIVATE_FLAG_PROFILEABLE_BY_SHELL = 1 << 23; /** * Indicates whether this package requires access to non-SDK APIs. * Only system apps and tests are allowed to use this property. * @hide */ public static final int PRIVATE_FLAG_HAS_FRAGILE_USER_DATA = 1 << 24; /** @hide */ @IntDef(flag = true, prefix = { "PRIVATE_FLAG_" }, value = { PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE, Loading @@ -655,6 +662,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { PRIVATE_FLAG_STATIC_SHARED_LIBRARY, PRIVATE_FLAG_VENDOR, PRIVATE_FLAG_VIRTUAL_PRELOAD, PRIVATE_FLAG_HAS_FRAGILE_USER_DATA, }) @Retention(RetentionPolicy.SOURCE) public @interface ApplicationInfoPrivateFlags {} Loading Loading @@ -1730,6 +1738,17 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return (privateFlags & PRIVATE_FLAG_USES_NON_SDK_API) != 0; } /** * Whether an app needs to keep the app data on uninstall. * * @return {@code true} if the app indicates that it needs to keep the app data * * @hide */ public boolean hasFragileUserData() { return (privateFlags & PRIVATE_FLAG_HAS_FRAGILE_USER_DATA) != 0; } private boolean isAllowedToUseHiddenApis() { if (isSignedWithPlatformKey()) { return true; Loading core/java/android/content/pm/PackageParser.java +6 −0 Original line number Diff line number Diff line Loading @@ -3710,6 +3710,12 @@ public class PackageParser { ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_USES_NON_SDK_API; } if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_hasFragileUserData, false)) { ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_HAS_FRAGILE_USER_DATA; } if (outError[0] == null) { CharSequence pname; if (owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.FROYO) { Loading core/res/res/values/attrs_manifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1603,6 +1603,9 @@ <!-- Declares that this application should be invoked without non-SDK API enforcement --> <attr name="usesNonSdkApi" /> <!-- If {@code true} the user is prompted to keep the app's data on uninstall --> <attr name="hasFragileUserData" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be used to control access from other packages to specific components or Loading core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2930,6 +2930,7 @@ <public name="dataRetentionTime" /> <public name="selectionDividerHeight" /> <public name="foregroundServiceType" /> <public name="hasFragileUserData" /> </public-group> <public-group type="drawable" first-id="0x010800b4"> Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -704,6 +704,7 @@ package android { field public static final int hapticFeedbackEnabled = 16843358; // 0x101025e field public static final int hardwareAccelerated = 16843475; // 0x10102d3 field public static final int hasCode = 16842764; // 0x101000c field public static final int hasFragileUserData = 16844192; // 0x10105a0 field public static final deprecated int headerAmPmTextAppearance = 16843936; // 0x10104a0 field public static final int headerBackground = 16843055; // 0x101012f field public static final deprecated int headerDayOfMonthTextAppearance = 16843927; // 0x1010497
core/java/android/content/pm/ApplicationInfo.java +19 −0 Original line number Diff line number Diff line Loading @@ -631,6 +631,13 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { */ public static final int PRIVATE_FLAG_PROFILEABLE_BY_SHELL = 1 << 23; /** * Indicates whether this package requires access to non-SDK APIs. * Only system apps and tests are allowed to use this property. * @hide */ public static final int PRIVATE_FLAG_HAS_FRAGILE_USER_DATA = 1 << 24; /** @hide */ @IntDef(flag = true, prefix = { "PRIVATE_FLAG_" }, value = { PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE, Loading @@ -655,6 +662,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { PRIVATE_FLAG_STATIC_SHARED_LIBRARY, PRIVATE_FLAG_VENDOR, PRIVATE_FLAG_VIRTUAL_PRELOAD, PRIVATE_FLAG_HAS_FRAGILE_USER_DATA, }) @Retention(RetentionPolicy.SOURCE) public @interface ApplicationInfoPrivateFlags {} Loading Loading @@ -1730,6 +1738,17 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return (privateFlags & PRIVATE_FLAG_USES_NON_SDK_API) != 0; } /** * Whether an app needs to keep the app data on uninstall. * * @return {@code true} if the app indicates that it needs to keep the app data * * @hide */ public boolean hasFragileUserData() { return (privateFlags & PRIVATE_FLAG_HAS_FRAGILE_USER_DATA) != 0; } private boolean isAllowedToUseHiddenApis() { if (isSignedWithPlatformKey()) { return true; Loading
core/java/android/content/pm/PackageParser.java +6 −0 Original line number Diff line number Diff line Loading @@ -3710,6 +3710,12 @@ public class PackageParser { ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_USES_NON_SDK_API; } if (sa.getBoolean( com.android.internal.R.styleable.AndroidManifestApplication_hasFragileUserData, false)) { ai.privateFlags |= ApplicationInfo.PRIVATE_FLAG_HAS_FRAGILE_USER_DATA; } if (outError[0] == null) { CharSequence pname; if (owner.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.FROYO) { Loading
core/res/res/values/attrs_manifest.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1603,6 +1603,9 @@ <!-- Declares that this application should be invoked without non-SDK API enforcement --> <attr name="usesNonSdkApi" /> <!-- If {@code true} the user is prompted to keep the app's data on uninstall --> <attr name="hasFragileUserData" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be used to control access from other packages to specific components or Loading
core/res/res/values/public.xml +1 −0 Original line number Diff line number Diff line Loading @@ -2930,6 +2930,7 @@ <public name="dataRetentionTime" /> <public name="selectionDividerHeight" /> <public name="foregroundServiceType" /> <public name="hasFragileUserData" /> </public-group> <public-group type="drawable" first-id="0x010800b4"> Loading