Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0029f571 authored by Christopher Tate's avatar Christopher Tate
Browse files

Note null alarm worksource names under the alarm's package

And log a nastygram because it implies the app is misbehaving.

Bug 29333122

Change-Id: Ia683304b8a9eafb234df81e874ee3f0636c4e56a
parent 366f3241
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3073,9 +3073,14 @@ class AlarmManagerService extends SystemService {
                fs.numWakeup++;
                if (alarm.workSource != null && alarm.workSource.size() > 0) {
                    for (int wi=0; wi<alarm.workSource.size(); wi++) {
                        final String wsName = alarm.workSource.getName(wi);
                        if (wsName == null) {
                            Slog.w(TAG, "Null worksource name for alarm " + alarm);
                        }
                        ActivityManagerNative.noteWakeupAlarm(
                                alarm.operation, alarm.workSource.get(wi),
                                alarm.workSource.getName(wi), alarm.statsTag);
                                (wsName != null) ? wsName : alarm.packageName,
                                alarm.statsTag);
                    }
                } else {
                    ActivityManagerNative.noteWakeupAlarm(