OSDN Git Service

Wake up device on JobScheduler Alarms
authorShreyas Basarge <snb@google.com>
Wed, 20 Jan 2016 16:25:07 +0000 (16:25 +0000)
committerShreyas Basarge <snb@google.com>
Wed, 20 Jan 2016 16:25:07 +0000 (16:25 +0000)
Changed the alarm type to wake up the
device when deadlineExpired or delayExpired
alarms go off.

Change-Id: Ica5c4de3c84646eae1f08fe1ca5d2ffc61265062

services/core/java/com/android/server/job/controllers/TimeController.java

index 33b09e3..854ce31 100644 (file)
@@ -202,7 +202,7 @@ public class TimeController extends StateController {
     /**
      * Set an alarm with the {@link android.app.AlarmManager} for the next time at which a job's
      * delay will expire.
-     * This alarm <b>will not</b> wake up the phone.
+     * This alarm <b>will</b> wake up the phone.
      */
     private void setDelayExpiredAlarm(long alarmTimeElapsedMillis) {
         alarmTimeElapsedMillis = maybeAdjustAlarmTime(alarmTimeElapsedMillis);
@@ -238,7 +238,7 @@ public class TimeController extends StateController {
             if (DEBUG) {
                 Slog.d(TAG, "Setting " + tag + " for: " + alarmTimeElapsed);
             }
-            mAlarmService.set(AlarmManager.ELAPSED_REALTIME, alarmTimeElapsed,
+            mAlarmService.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, alarmTimeElapsed,
                     tag, listener, null);
         }
     }