diff options
| author | 2017-05-23 15:54:18 -0700 | |
|---|---|---|
| committer | 2017-05-24 07:34:55 -0700 | |
| commit | 3051caac52729c8c059eb538805f4d274a9945a5 (patch) | |
| tree | 71398994494ba033969da2a70e05aab29b121b87 /services/usage/java | |
| parent | d7a2c1c23bdd6547aa864e325792cd89ffde0c5e (diff) | |
System installed launcher can see instant apps
Change-Id: I97f791b61f9b4f7ed33305345bf3d92394b40ae4
Fixes: 38202759
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Test: Manual. Create sample app that replaces the launcher to test ability to see ephemeral apps.
Diffstat (limited to 'services/usage/java')
| -rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsService.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index 0de3c7c75016..5211fd6af744 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java @@ -411,8 +411,8 @@ public class UsageStatsService extends SystemService implements } } - private boolean shouldObfuscateInstantAppsForCaller(int callingUid) { - return !mPackageManagerInternal.canAccessInstantApps(callingUid); + private boolean shouldObfuscateInstantAppsForCaller(int callingUid, int userId) { + return !mPackageManagerInternal.canAccessInstantApps(callingUid, userId); } void clearAppIdleForPackage(String packageName, int userId) { @@ -1387,7 +1387,7 @@ public class UsageStatsService extends SystemService implements } final boolean obfuscateInstantApps = shouldObfuscateInstantAppsForCaller( - Binder.getCallingUid()); + Binder.getCallingUid(), UserHandle.getCallingUserId()); final int userId = UserHandle.getCallingUserId(); final long token = Binder.clearCallingIdentity(); @@ -1432,7 +1432,7 @@ public class UsageStatsService extends SystemService implements } final boolean obfuscateInstantApps = shouldObfuscateInstantAppsForCaller( - Binder.getCallingUid()); + Binder.getCallingUid(), UserHandle.getCallingUserId()); final int userId = UserHandle.getCallingUserId(); final long token = Binder.clearCallingIdentity(); @@ -1453,7 +1453,7 @@ public class UsageStatsService extends SystemService implements throw re.rethrowFromSystemServer(); } final boolean obfuscateInstantApps = shouldObfuscateInstantAppsForCaller( - Binder.getCallingUid()); + Binder.getCallingUid(), userId); final long token = Binder.clearCallingIdentity(); try { return UsageStatsService.this.isAppIdleFilteredOrParoled(packageName, userId, |