Merge "Add hidden shutdown method to PowerManager." into lmp-mr1-modular-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
00de5c9f04
@@ -834,6 +834,21 @@ public final class PowerManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Turn off the device.
|
||||||
|
*
|
||||||
|
* @param confirm If true, shows a shutdown confirmation dialog.
|
||||||
|
* @param wait If true, this call waits for the shutdown to complete and does not return.
|
||||||
|
*
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public void shutdown(boolean confirm, boolean wait) {
|
||||||
|
try {
|
||||||
|
mService.shutdown(confirm, wait);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Intent that is broadcast when the state of {@link #isPowerSaveMode()} changes.
|
* Intent that is broadcast when the state of {@link #isPowerSaveMode()} changes.
|
||||||
* This broadcast is only sent to registered receivers.
|
* This broadcast is only sent to registered receivers.
|
||||||
|
|||||||
Reference in New Issue
Block a user