Loading telephony/java/android/telephony/TelephonyManager.java +17 −9 Original line number Diff line number Diff line Loading @@ -10642,12 +10642,20 @@ public class TelephonyManager { * no reason to power it off. When any of the voters want to power it off, it will be turned * off. In case of emergency, the radio will be turned on even if there are some reasons for * powering it off, and these radio off votes will be cleared. * Multiple apps can vote for the same reason and the last vote will take effect. Each app is * responsible for its vote. A powering-off vote of a reason will be maintained until it is * cleared by calling {@link clearRadioPowerOffForReason} for that reason, or an emergency call * is made, or the device is rebooted. When an app comes backup from a crash, it needs to make * sure if its vote is as expected. An app can use the API {@link getRadioPowerOffReasons} to * check its vote. * <p> * Each API call is for one reason. However, an app can call the API multiple times for multiple * reasons. Multiple apps can vote for the same reason but the vote of one app does not affect * the vote of another app. * <p> * Each app is responsible for its vote. A powering-off vote for a reason of an app will be * maintained until it is cleared by calling {@link #clearRadioPowerOffForReason(int)} for that * reason by the app, or an emergency call is made, or the device is rebooted. When an app * comes backup from a crash, it needs to make sure if its vote is as expected. An app can use * the API {@link #getRadioPowerOffReasons()} to check its votes. Votes won't be removed when * an app crashes. * <p> * User setting for power state is persistent across device reboots. This applies to all users, * callers must be careful to update the off reasons when the current user changes. * * @param reason The reason for powering off radio. * @throws SecurityException if the caller does not have MODIFY_PHONE_STATE permission. Loading Loading @@ -10704,10 +10712,10 @@ public class TelephonyManager { } /** * Get reasons for powering off radio, as requested by {@link requestRadioPowerOffForReason}. * If the reason set is empty, the radio is on in all cases. * Get reasons for powering off radio of the calling app, as requested by * {@link #requestRadioPowerOffForReason(int)}. * * @return Set of reasons for powering off radio. * @return Set of reasons for powering off radio of the calling app. * @throws SecurityException if the caller does not have READ_PRIVILEGED_PHONE_STATE permission. * @throws IllegalStateException if the Telephony service is not currently available. * Loading Loading
telephony/java/android/telephony/TelephonyManager.java +17 −9 Original line number Diff line number Diff line Loading @@ -10642,12 +10642,20 @@ public class TelephonyManager { * no reason to power it off. When any of the voters want to power it off, it will be turned * off. In case of emergency, the radio will be turned on even if there are some reasons for * powering it off, and these radio off votes will be cleared. * Multiple apps can vote for the same reason and the last vote will take effect. Each app is * responsible for its vote. A powering-off vote of a reason will be maintained until it is * cleared by calling {@link clearRadioPowerOffForReason} for that reason, or an emergency call * is made, or the device is rebooted. When an app comes backup from a crash, it needs to make * sure if its vote is as expected. An app can use the API {@link getRadioPowerOffReasons} to * check its vote. * <p> * Each API call is for one reason. However, an app can call the API multiple times for multiple * reasons. Multiple apps can vote for the same reason but the vote of one app does not affect * the vote of another app. * <p> * Each app is responsible for its vote. A powering-off vote for a reason of an app will be * maintained until it is cleared by calling {@link #clearRadioPowerOffForReason(int)} for that * reason by the app, or an emergency call is made, or the device is rebooted. When an app * comes backup from a crash, it needs to make sure if its vote is as expected. An app can use * the API {@link #getRadioPowerOffReasons()} to check its votes. Votes won't be removed when * an app crashes. * <p> * User setting for power state is persistent across device reboots. This applies to all users, * callers must be careful to update the off reasons when the current user changes. * * @param reason The reason for powering off radio. * @throws SecurityException if the caller does not have MODIFY_PHONE_STATE permission. Loading Loading @@ -10704,10 +10712,10 @@ public class TelephonyManager { } /** * Get reasons for powering off radio, as requested by {@link requestRadioPowerOffForReason}. * If the reason set is empty, the radio is on in all cases. * Get reasons for powering off radio of the calling app, as requested by * {@link #requestRadioPowerOffForReason(int)}. * * @return Set of reasons for powering off radio. * @return Set of reasons for powering off radio of the calling app. * @throws SecurityException if the caller does not have READ_PRIVILEGED_PHONE_STATE permission. * @throws IllegalStateException if the Telephony service is not currently available. * Loading