From 5e5c171dea2bb43013fbd72933a1b84df9dba818 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 16 Jan 2018 17:45:44 -0800 Subject: [PATCH] Clear the right uid's alarms, please When we clear data for an app, we need to cancel the alarms for that app's uid -- not the *calling* uid, which could be something like the Settings app's, i.e. the system uid. That's bad. Bug: 72059961 Bug: 70670726 Test: manual Change-Id: Ib6833ce2672bc6dfab6a4be6014a0301611576e2 --- .../core/java/com/android/server/am/ActivityManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index a0799edf6e8f7..dfe89e00b20bb 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -6243,7 +6243,7 @@ public class ActivityManagerService extends IActivityManager.Stub // Clear its pending alarms AlarmManagerInternal ami = LocalServices.getService(AlarmManagerInternal.class); - ami.removeAlarmsForUid(uid); + ami.removeAlarmsForUid(appInfo.uid); } } catch (RemoteException e) { }