From b7583ae4c856162aeac18f4169cfa1d06aa641a8 Mon Sep 17 00:00:00 2001 From: Adnan Begovic Date: Wed, 18 May 2016 14:12:12 -0700 Subject: am: Handle unchecked activity starts for protected components. Previously if you received a notification from a protected app, since AM would state that the calling package was also the target package, the protected apps implementation would allow you to launch into the application. Mitigate this by hooking into the unchecked activity start stack (pending intent launches) globally. Change-Id: I0371593ade9e4af2554962873d89a0f82a639b57 TICKET: PAELLA-216 FEIJ-160 FEIJ-177 --- core/java/android/content/pm/IPackageManager.aidl | 4 ++-- core/java/android/content/pm/PackageManager.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/java/android/content') diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl index 6d8b5cb..a3329db 100644 --- a/core/java/android/content/pm/IPackageManager.aidl +++ b/core/java/android/content/pm/IPackageManager.aidl @@ -521,6 +521,6 @@ interface IPackageManager { int processThemeResources(String themePkgName); /** Protected Apps */ - boolean isComponentProtected(in String callingPackage, in ComponentName componentName, - int userId); + boolean isComponentProtected(in String callingPackage, in int callingUid, + in ComponentName componentName, int userId); } diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 529d641..8f0500e 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -4564,7 +4564,7 @@ public abstract class PackageManager { * Return whether or not a specific component is protected * @hide */ - public abstract boolean isComponentProtected(String callingPackage, + public abstract boolean isComponentProtected(String callingPackage, int callingUid, ComponentName componentName); /** -- cgit v1.1