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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23635699

Change-Id: I540fd8f056930c55cedabb11e7b12a62a8b4c086
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Philip Junker
2023-06-12 13:41:08 +00:00
committed by Automerger Merge Worker
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. */