Skip to content

Commit 639421c

Browse files
Prashant MalaniAndroid Git Automerger
authored andcommitted
am fed4a55: Merge "Move wakelock release to handleMessage" into klp-modular-dev
* commit 'fed4a5565b9318fa1132003ad3599fa42bbefdf0': Move wakelock release to handleMessage
2 parents a4ef5a3 + fed4a55 commit 639421c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

services/core/java/com/android/server/DockObserver.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,6 @@ private void handleDockStateChange() {
201201
// There are many components in the system watching for this so as to
202202
// adjust audio routing, screen orientation, etc.
203203
getContext().sendStickyBroadcastAsUser(intent, UserHandle.ALL);
204-
205-
// Release the wake lock that was acquired when the message was posted.
206-
mWakeLock.release();
207204
}
208205
}
209206

@@ -213,6 +210,7 @@ public void handleMessage(Message msg) {
213210
switch (msg.what) {
214211
case MSG_DOCK_STATE_CHANGED:
215212
handleDockStateChange();
213+
mWakeLock.release();
216214
break;
217215
}
218216
}

0 commit comments

Comments
 (0)