Merge "Deprecate POWER_SAVE_MODE_CHANGING broadcast." into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-03-24 20:56:25 +00:00
committed by Android (Google) Code Review

View File

@@ -2224,15 +2224,27 @@ public final class PowerManager {
* Intent that is broadcast when the state of {@link #isPowerSaveMode()} is about to change.
* This broadcast is only sent to registered receivers.
*
* @deprecated This is sent at the same time as {@link #ACTION_POWER_SAVE_MODE_CHANGED} so it
* does not provide advanced warning. As such it will be removed in future Android versions.
* Use {@link #ACTION_POWER_SAVE_MODE_CHANGED} and {@link #isPowerSaveMode()} instead.
*
* @hide
*/
@UnsupportedAppUsage
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.Q,
publicAlternatives = "Use {@link #ACTION_POWER_SAVE_MODE_CHANGED} instead.")
@SdkConstant(SdkConstant.SdkConstantType.BROADCAST_INTENT_ACTION)
@Deprecated
public static final String ACTION_POWER_SAVE_MODE_CHANGING
= "android.os.action.POWER_SAVE_MODE_CHANGING";
/** @hide */
@UnsupportedAppUsage
/**
* @deprecated Use {@link #isPowerSaveMode()} instead.
*
* @hide
*/
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.Q,
publicAlternatives = "Use {@link #isPowerSaveMode()} instead.")
@Deprecated
public static final String EXTRA_POWER_SAVE_MODE = "mode";
/**