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

Commit 0d32b66d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Update alarmManager to use exact timing" into udc-d1-dev am: b5d6eda4...

Merge "Update alarmManager to use exact timing" into udc-d1-dev am: b5d6eda4 am: 3cce697e am: 71570860

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/24042283



Change-Id: I6ff456a3748affff1b4e4f8a4c1046f58ebdc2f5
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6bf4e64b 71570860
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1469,9 +1469,9 @@ public class DataRetryManager extends Handler {
        } else {
            Intent intent = new Intent(ACTION_RETRY);
            intent.putExtra(ACTION_RETRY_EXTRA_HASHCODE, dataRetryEntry.hashCode());
            // No need to wake up the device at the exact time, the retry can wait util next time
            // the device wake up to save power.
            mAlarmManager.setAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME,
            // No need to wake up the device, the retry can wait util next time the device wake up
            // to save power.
            mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME,
                    dataRetryEntry.retryElapsedTime,
                    PendingIntent.getBroadcast(mPhone.getContext(),
                            dataRetryEntry.hashCode() /*Unique identifier of this retry attempt*/,
+1 −1
Original line number Diff line number Diff line
@@ -795,7 +795,7 @@ public class DataRetryManagerTest extends TelephonyTest {
        // Verify scheduled via Alarm Manager
        ArgumentCaptor<PendingIntent> pendingIntentArgumentCaptor =
                ArgumentCaptor.forClass(PendingIntent.class);
        verify(mAlarmManager).setAndAllowWhileIdle(anyInt(), anyLong(),
        verify(mAlarmManager).setExactAndAllowWhileIdle(anyInt(), anyLong(),
                pendingIntentArgumentCaptor.capture());

        // Verify starts retry attempt after receiving intent