summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2016-12-07 14:18:57 -0800
committerPhilip P. Moltmann <moltmann@google.com>2016-12-07 14:19:01 -0800
commite01dae7f54c05ad4bc07755511bee614d72a4183 (patch)
tree6d9a8e5405ac3f4c57c80074b967798e5edb7301
parent7f0a85d0f4c938dcd0806cf945c24252c98b2971 (diff)
downloadandroid_packages_apps_PackageInstaller-e01dae7f54c05ad4bc07755511bee614d72a4183.tar.gz
android_packages_apps_PackageInstaller-e01dae7f54c05ad4bc07755511bee614d72a4183.tar.bz2
android_packages_apps_PackageInstaller-e01dae7f54c05ad4bc07755511bee614d72a4183.zip
Prioritze package installer intent filter
Package Installer intent should always be handled by the package installer. Only privilegded apps can have a priority > 0. Bug: 32553261 Change-Id: I79fd77b12bad9b79d1a53d08629a2b07919aad2c
-rw-r--r--Android.mk2
-rw-r--r--AndroidManifest.xml8
2 files changed, 6 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk
index 092bf9c0..60f31b93 100644
--- a/Android.mk
+++ b/Android.mk
@@ -12,6 +12,8 @@ LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
LOCAL_PACKAGE_NAME := PackageInstaller
LOCAL_CERTIFICATE := platform
+LOCAL_PRIVILEGED_MODULE := true
+
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
include $(BUILD_PACKAGE)
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 8b04c7fa..8e234e14 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -19,14 +19,14 @@
<activity android:name=".PackageInstallerActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:excludeFromRecents="true">
- <intent-filter>
+ <intent-filter android:priority="1">
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.INSTALL_PACKAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="application/vnd.android.package-archive" />
</intent-filter>
- <intent-filter>
+ <intent-filter android:priority="1">
<action android:name="android.intent.action.INSTALL_PACKAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
@@ -40,7 +40,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.DeviceDefault.Dialog.NoActionBar">
- <intent-filter>
+ <intent-filter android:priority="1">
<action android:name="android.intent.action.DELETE" />
<action android:name="android.intent.action.UNINSTALL_PACKAGE" />
<category android:name="android.intent.category.DEFAULT" />
@@ -54,7 +54,7 @@
android:configChanges="orientation|keyboardHidden|screenSize"
android:excludeFromRecents="true"
android:theme="@android:style/Theme.DeviceDefault.Dialog.NoActionBar">
- <intent-filter>
+ <intent-filter android:priority="1">
<action android:name="android.content.pm.action.REQUEST_PERMISSION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>