OSDN Git Service

Add a new WakeupMessage class and use it in two places.
authorLorenzo Colitti <lorenzo@google.com>
Wed, 2 Dec 2015 08:51:28 +0000 (17:51 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Tue, 8 Dec 2015 14:50:23 +0000 (23:50 +0900)
commit9d3aadb24778cc36a350a04b088d2ed7ee3790e1
treeff0aa6d6f41275f2fa77632aa0067151c9e793a2
parentd6d5f8f0455b2a51098745218eecf1cb4afd3920
Add a new WakeupMessage class and use it in two places.

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
Change-Id: Idff20029d287f26347441a2523b7fb20eda6a8b0
core/java/com/android/internal/util/WakeupMessage.java [new file with mode: 0644]
services/core/java/com/android/server/connectivity/NetworkMonitor.java
services/net/java/android/net/dhcp/DhcpClient.java