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

Commit 1353bdbd authored by Chris Tate's avatar Chris Tate Committed by Android (Google) Code Review
Browse files

Merge "Allow direct-callback alarms for non-wakeup alarms"

parents 6c24afe4 ff6390cd
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1233,14 +1233,6 @@ class AlarmManagerService extends SystemService {
                }
            }

            // direct-callback alarms must be wakeup alarms (otherwise they should just be
            // posting work to a Handler)
            if (directReceiver != null) {
                if (type != RTC_WAKEUP && type != ELAPSED_REALTIME_WAKEUP) {
                    throw new IllegalArgumentException("Only wakeup alarms can use AlarmReceivers");
                }
            }

            if (workSource != null) {
                getContext().enforcePermission(
                        android.Manifest.permission.UPDATE_DEVICE_STATS,