From 86877e44f054facb535b29b8db7fda8c543bc245 Mon Sep 17 00:00:00 2001 From: Svet Ganov Date: Thu, 28 May 2015 08:19:48 -0700 Subject: [PATCH] Add a normal permission guarding the installer UI - used for stats tracking bug:2147009 Change-Id: Id020eaf7b852de43966f4ab8231e3f7046e66542 --- api/current.txt | 1 + api/system-current.txt | 1 + core/java/android/content/Intent.java | 5 +++++ core/res/AndroidManifest.xml | 9 ++++++++- core/res/res/values/strings.xml | 5 +++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/api/current.txt b/api/current.txt index 2a2d9fc5c28ab..a970a0c528e54 100644 --- a/api/current.txt +++ b/api/current.txt @@ -120,6 +120,7 @@ package android { field public static final java.lang.String RECEIVE_WAP_PUSH = "android.permission.RECEIVE_WAP_PUSH"; field public static final java.lang.String RECORD_AUDIO = "android.permission.RECORD_AUDIO"; field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS"; + field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES"; field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES"; field public static final java.lang.String SEND_RESPOND_VIA_MESSAGE = "android.permission.SEND_RESPOND_VIA_MESSAGE"; field public static final java.lang.String SEND_SMS = "android.permission.SEND_SMS"; diff --git a/api/system-current.txt b/api/system-current.txt index 80908a0dd520d..a19540ecb4b40 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -180,6 +180,7 @@ package android { field public static final java.lang.String REGISTER_SIM_SUBSCRIPTION = "android.permission.REGISTER_SIM_SUBSCRIPTION"; field public static final java.lang.String REMOVE_DRM_CERTIFICATES = "android.permission.REMOVE_DRM_CERTIFICATES"; field public static final java.lang.String REORDER_TASKS = "android.permission.REORDER_TASKS"; + field public static final java.lang.String REQUEST_INSTALL_PACKAGES = "android.permission.REQUEST_INSTALL_PACKAGES"; field public static final deprecated java.lang.String RESTART_PACKAGES = "android.permission.RESTART_PACKAGES"; field public static final java.lang.String RETRIEVE_WINDOW_CONTENT = "android.permission.RETRIEVE_WINDOW_CONTENT"; field public static final java.lang.String SCORE_NETWORKS = "android.permission.SCORE_NETWORKS"; diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 494b53a8150fc..7f398bd30d438 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -1387,6 +1387,11 @@ public class Intent implements Parcelable, Cloneable { *

* Output: If {@link #EXTRA_RETURN_RESULT}, returns whether the install * succeeded. + *

+ * Note:If your app is targeting API level higher than 22 you + * need to hold {@link android.Manifest.permission#REQUEST_INSTALL_PACKAGES} + * in order to launch the application installer. + *

* * @see #EXTRA_INSTALLER_PACKAGE_NAME * @see #EXTRA_NOT_UNKNOWN_SOURCE diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 595f9f07da184..ed41b295a9ef2 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -1475,7 +1475,6 @@ android:label="@string/permlab_readSyncStats" android:protectionLevel="normal" /> - @@ -1933,6 +1932,14 @@ + + + Allows an application to read install sessions. This allows it to see details about active package installations. + + Request install packages + + Allows an application to request installation of packages. + Touch twice for zoom control