Merge "Don't enforce android.permission.TURN_SCREEN_ON in UDC." into udc-dev

This commit is contained in:
Philip Junker
2023-06-12 12:56:33 +00:00
committed by Android (Google) Code Review
2 changed files with 3 additions and 4 deletions

View File

@@ -190,8 +190,7 @@ public final class PowerManager {
/**
* Wake lock flag: Turn the screen on when the wake lock is acquired.
* <p>
* This flag requires {@link android.Manifest.permission#TURN_SCREEN_ON} for apps targeting
* Android version {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE} and higher.
* This flag will require {@link android.Manifest.permission#TURN_SCREEN_ON} in future releases.
* </p><p>
* Normally wake locks don't actually wake the device, they just cause the screen to remain on
* once it's already on. This flag will cause the device to wake up when the wake lock is

View File

@@ -283,7 +283,7 @@ public final class PowerManagerService extends SystemService
private static final long ENHANCED_DISCHARGE_PREDICTION_BROADCAST_MIN_DELAY_MS = 60 * 1000L;
/**
* Apps targeting Android U and above need to define
* Apps targeting Android V and above need to define
* {@link android.Manifest.permission#TURN_SCREEN_ON} in their manifest for
* {@link android.os.PowerManager#ACQUIRE_CAUSES_WAKEUP} to have any effect.
* Note that most applications should use {@link android.R.attr#turnScreenOn} or
@@ -291,7 +291,7 @@ public final class PowerManagerService extends SystemService
* previous foreground app from being resumed first when the screen turns on.
*/
@ChangeId
@EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
@EnabledSince(targetSdkVersion = Build.VERSION_CODES.CUR_DEVELOPMENT)
public static final long REQUIRE_TURN_SCREEN_ON_PERMISSION = 216114297L;
/** Reason ID for holding display suspend blocker. */