a457ebbda6c84d5f6abd055828ef02ceaf809c08 |
|
31-Aug-2016 |
Erik Kline <ek@google.com> |
Have WakeupMessage call Handler#dispatchMessage() Handler has no fewer than three ways by which a message might be handled: [1] the msg itself contains a callback (msg.callback.run()) [2] the Handler was instantiated with a Handler.Callback (mCallback.handleMessage(msg)) [3] the Handler instance was a subclass and could have overridden handleMessage() Handler#dispatchMessage() tries to find the correct way to dispatch a message, check the above in the above order. Bug: 21859053 Change-Id: I284cf7ace93af167d95d13b297ec42d4bed15992
/frameworks/base/core/java/com/android/internal/util/WakeupMessage.java
|
eab17da5882e59caff25c73aa6bcd0587aca9dd4 |
|
07-Jun-2016 |
Lorenzo Colitti <lorenzo@google.com> |
Give WakeupMessage the ability to transport an object as well. Bug: 23113288 Change-Id: Ic98e3bcb3ea8b0b28a309bd647fb4178311c46a3
/frameworks/base/core/java/com/android/internal/util/WakeupMessage.java
|
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
|