e7636e47504034c048872f251a0a7cb240017b31 |
|
20-Feb-2016 |
Lorenzo Colitti <lorenzo@google.com> |
Make it easier to test code that uses WakeupMessage. Code that uses WakeupMessage uses the AlarmManager. Testing such code is slow because AlarmManager.MIN_FUTURITY ensures that alarms must wait at least 5 seconds before firing. This change makes WakeupMessage's fields protected so that test code can subclass from it and override schedule() and cancel() with implementations that do not use AlarmManager, for example by making schedule() call sendEmptyMessageDelayed and making cancel() call removeMessages. Change-Id: I51096b182d9eb87cc7bd46c3c91906f18356b354
/frameworks/base/core/java/com/android/internal/util/WakeupMessage.java
|
634c1f9d0d43c7874ea433188b45fdf944d98a5a |
|
19-Feb-2016 |
Mitchell Wills <mwills@google.com> |
Modify WakeupMessage to only send the message if not canceled Change-Id: I9ca6d3726fe25c706b644bf61119837a7cbe6db1
/frameworks/base/core/java/com/android/internal/util/WakeupMessage.java
|
e9ae977322d40eff94fcbe3fad186cd082a577b6 |
|
02-Dec-2015 |
Lorenzo Colitti <lorenzo@google.com> |
DO NOT MERGE Add a new WakeupMessage class This is useful when using the new AlarmManager direct callback interface to wake up the system and request that an object whose API consists of messages (such as a StateMachine) perform some action. In this situation, using AlarmManager.onAlarmListener by itself will wake up the system to send the message, but does not guarantee that the system will be awake until the target object has processed it. This is because as soon as the onAlarmListener sends the message and returns, the system is free to go to sleep again. Bug: 20157436 Bug: 25823676 Cherry-picked WakeupMessage.java from 9d3aadb24778cc36a350a04b088d2ed7ee3790e1 Change-Id: Idff20029d287f26347441a2523b7fb20eda6a8b0
/frameworks/base/core/java/com/android/internal/util/WakeupMessage.java
|