Add self update permission
This permission is a subset of INSTALL_PACKAGES that only allows a
package to update itself. Many of the users of INSTALL_PACKAGE claim to
be using it solely for self updating but INSTALL_PACKAGES gives a lot
more power than is needed. This limits those priv apps to what they
intend to do.
Test: manual
Change-Id: I3442ad1a285df660b8c2635e3db59d7bc0662324
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 8573e1d..39046d2 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2776,6 +2776,14 @@
<!-- @SystemApi Allows an application to install packages.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_PACKAGES"
+ android:protectionLevel="signature|privileged" />
+
+ <!-- @SystemApi Allows an application to install self updates. This is a limited version
+ of {@link android.Manifest.permission#INSTALL_PACKAGES}.
+ <p>Not for use by third-party applications.
+ @hide
+ -->
+ <permission android:name="android.permission.INSTALL_SELF_UPDATES"
android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to clear user data.