Loading core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,7 @@ package android { field public static final int allowTaskReparenting = 16843268; // 0x1010204 field public static final int allowUndo = 16843999; // 0x10104df field public static final int allowUntrustedActivityEmbedding = 16844393; // 0x1010669 field public static final int allowUpdateOwnership; field public static final int alpha = 16843551; // 0x101031f field public static final int alphabeticModifiers = 16844110; // 0x101054e field public static final int alphabeticShortcut = 16843235; // 0x10101e3 Loading Loading @@ -12257,6 +12258,7 @@ package android.content.pm { method @NonNull public java.util.List<android.content.pm.PackageManager.Property> queryProviderProperty(@NonNull String); method @NonNull public java.util.List<android.content.pm.PackageManager.Property> queryReceiverProperty(@NonNull String); method @NonNull public java.util.List<android.content.pm.PackageManager.Property> queryServiceProperty(@NonNull String); method public void relinquishUpdateOwnership(@NonNull String); method @Deprecated public abstract void removePackageFromPreferred(@NonNull String); method public abstract void removePermission(@NonNull String); method @RequiresPermission(value="android.permission.WHITELIST_RESTRICTED_PERMISSIONS", conditional=true) public boolean removeWhitelistedRestrictedPermission(@NonNull String, @NonNull String, int); core/java/android/app/ApplicationPackageManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -3890,4 +3890,14 @@ public class ApplicationPackageManager extends PackageManager { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, 0) == 1; } @Override public void relinquishUpdateOwnership(String targetPackage) { Objects.requireNonNull(targetPackage); try { mPM.relinquishUpdateOwnership(targetPackage); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } } core/java/android/content/pm/IPackageManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,8 @@ interface IPackageManager { @UnsupportedAppUsage void setInstallerPackageName(in String targetPackage, in String installerPackageName); void relinquishUpdateOwnership(in String targetPackage); void setApplicationCategoryHint(String packageName, int categoryHint, String callerPackageName); /** @deprecated rawr, don't call AIDL methods directly! */ Loading core/java/android/content/pm/PackageManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -10877,4 +10877,16 @@ public abstract class PackageManager { throw new UnsupportedOperationException( "isShowNewAppInstalledNotificationEnabled not implemented in subclass"); } /** * Attempt to relinquish the update ownership of the given package. Only the current * update owner of the given package can use this API or a SecurityException will be * thrown. * * @param targetPackage The installed package whose update owner will be changed. */ public void relinquishUpdateOwnership(@NonNull String targetPackage) { throw new UnsupportedOperationException( "relinquishUpdateOwnership not implemented in subclass"); } } core/res/res/values/attrs_manifest.xml +9 −0 Original line number Diff line number Diff line Loading @@ -1783,6 +1783,14 @@ --> <attr name="attributionTags" format="string" /> <!-- Default value <code>true</code> allows an installer to enable update ownership enforcement for this package via {@link android.content.pm.PackageInstaller.SessionParams#setRequestUpdateOwnership} during initial installation. This overrides the installer's use of {@link android.content.pm.PackageInstaller.SessionParams#setRequestUpdateOwnership}. --> <attr name="allowUpdateOwnership" format="boolean" /> <!-- The <code>manifest</code> tag is the root of an <code>AndroidManifest.xml</code> file, describing the contents of an Android package (.apk) file. One Loading Loading @@ -1820,6 +1828,7 @@ <attr name="isSplitRequired" /> <attr name="requiredSplitTypes" /> <attr name="splitTypes" /> <attr name="allowUpdateOwnership" /> </declare-styleable> <!-- The <code>application</code> tag describes application-level components Loading Loading
core/api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,7 @@ package android { field public static final int allowTaskReparenting = 16843268; // 0x1010204 field public static final int allowUndo = 16843999; // 0x10104df field public static final int allowUntrustedActivityEmbedding = 16844393; // 0x1010669 field public static final int allowUpdateOwnership; field public static final int alpha = 16843551; // 0x101031f field public static final int alphabeticModifiers = 16844110; // 0x101054e field public static final int alphabeticShortcut = 16843235; // 0x10101e3 Loading Loading @@ -12257,6 +12258,7 @@ package android.content.pm { method @NonNull public java.util.List<android.content.pm.PackageManager.Property> queryProviderProperty(@NonNull String); method @NonNull public java.util.List<android.content.pm.PackageManager.Property> queryReceiverProperty(@NonNull String); method @NonNull public java.util.List<android.content.pm.PackageManager.Property> queryServiceProperty(@NonNull String); method public void relinquishUpdateOwnership(@NonNull String); method @Deprecated public abstract void removePackageFromPreferred(@NonNull String); method public abstract void removePermission(@NonNull String); method @RequiresPermission(value="android.permission.WHITELIST_RESTRICTED_PERMISSIONS", conditional=true) public boolean removeWhitelistedRestrictedPermission(@NonNull String, @NonNull String, int);
core/java/android/app/ApplicationPackageManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -3890,4 +3890,14 @@ public class ApplicationPackageManager extends PackageManager { return Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED, 0) == 1; } @Override public void relinquishUpdateOwnership(String targetPackage) { Objects.requireNonNull(targetPackage); try { mPM.relinquishUpdateOwnership(targetPackage); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
core/java/android/content/pm/IPackageManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -214,6 +214,8 @@ interface IPackageManager { @UnsupportedAppUsage void setInstallerPackageName(in String targetPackage, in String installerPackageName); void relinquishUpdateOwnership(in String targetPackage); void setApplicationCategoryHint(String packageName, int categoryHint, String callerPackageName); /** @deprecated rawr, don't call AIDL methods directly! */ Loading
core/java/android/content/pm/PackageManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -10877,4 +10877,16 @@ public abstract class PackageManager { throw new UnsupportedOperationException( "isShowNewAppInstalledNotificationEnabled not implemented in subclass"); } /** * Attempt to relinquish the update ownership of the given package. Only the current * update owner of the given package can use this API or a SecurityException will be * thrown. * * @param targetPackage The installed package whose update owner will be changed. */ public void relinquishUpdateOwnership(@NonNull String targetPackage) { throw new UnsupportedOperationException( "relinquishUpdateOwnership not implemented in subclass"); } }
core/res/res/values/attrs_manifest.xml +9 −0 Original line number Diff line number Diff line Loading @@ -1783,6 +1783,14 @@ --> <attr name="attributionTags" format="string" /> <!-- Default value <code>true</code> allows an installer to enable update ownership enforcement for this package via {@link android.content.pm.PackageInstaller.SessionParams#setRequestUpdateOwnership} during initial installation. This overrides the installer's use of {@link android.content.pm.PackageInstaller.SessionParams#setRequestUpdateOwnership}. --> <attr name="allowUpdateOwnership" format="boolean" /> <!-- The <code>manifest</code> tag is the root of an <code>AndroidManifest.xml</code> file, describing the contents of an Android package (.apk) file. One Loading Loading @@ -1820,6 +1828,7 @@ <attr name="isSplitRequired" /> <attr name="requiredSplitTypes" /> <attr name="splitTypes" /> <attr name="allowUpdateOwnership" /> </declare-styleable> <!-- The <code>application</code> tag describes application-level components Loading