diff options
| -rw-r--r-- | api/system-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageInstaller.java | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 8e5b99c4bad5..cb0c60fb0b2e 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -9929,6 +9929,7 @@ package android.content.pm { method public void setAppLabel(java.lang.CharSequence); method public void setAppPackageName(java.lang.String); method public void setGrantedRuntimePermissions(java.lang.String[]); + method public void setInstallFlagsDowngrade(); method public void setInstallLocation(int); method public void setOriginatingUid(int); method public void setOriginatingUri(android.net.Uri); diff --git a/core/java/android/content/pm/PackageInstaller.java b/core/java/android/content/pm/PackageInstaller.java index ec536e020d04..684a7d86ba5e 100644 --- a/core/java/android/content/pm/PackageInstaller.java +++ b/core/java/android/content/pm/PackageInstaller.java @@ -1052,6 +1052,12 @@ public class PackageInstaller { } /** {@hide} */ + @SystemApi + public void setInstallFlagsDowngrade() { + installFlags |= PackageManager.INSTALL_ALLOW_DOWNGRADE; + } + + /** {@hide} */ public void setInstallFlagsExternal() { installFlags |= PackageManager.INSTALL_EXTERNAL; installFlags &= ~PackageManager.INSTALL_INTERNAL; |