Merge "Add force-active command." into udc-dev am: 756198798f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21467717 Change-Id: I3deed359aa068a62180832d55ce708098a974c8f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -4589,6 +4589,22 @@ public class DeviceIdleController extends SystemService
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
} else if ("force-active".equals(cmd)) {
|
||||
getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
|
||||
null);
|
||||
synchronized (this) {
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
mForceIdle = true;
|
||||
becomeActiveLocked("force-active", Process.myUid());
|
||||
pw.print("Light state: ");
|
||||
pw.print(lightStateToString(mLightState));
|
||||
pw.print(", deep state: ");
|
||||
pw.println(stateToString(mState));
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
} else if ("force-idle".equals(cmd)) {
|
||||
getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
|
||||
null);
|
||||
|
||||
Reference in New Issue
Block a user