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: If3b7f102f37189414456a019f7382ef9f1fc8e30
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:45:06 +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. * Wake lock flag: Turn the screen on when the wake lock is acquired.
* <p> * <p>
* This flag requires {@link android.Manifest.permission#TURN_SCREEN_ON} for apps targeting * This flag will require {@link android.Manifest.permission#TURN_SCREEN_ON} in future releases.
* Android version {@link Build.VERSION_CODES#UPSIDE_DOWN_CAKE} and higher.
* </p><p> * </p><p>
* Normally wake locks don't actually wake the device, they just cause the screen to remain on * 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 * 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; 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.Manifest.permission#TURN_SCREEN_ON} in their manifest for
* {@link android.os.PowerManager#ACQUIRE_CAUSES_WAKEUP} to have any effect. * {@link android.os.PowerManager#ACQUIRE_CAUSES_WAKEUP} to have any effect.
* Note that most applications should use {@link android.R.attr#turnScreenOn} or * 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. * previous foreground app from being resumed first when the screen turns on.
*/ */
@ChangeId @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; public static final long REQUIRE_TURN_SCREEN_ON_PERMISSION = 216114297L;
/** Reason ID for holding display suspend blocker. */ /** Reason ID for holding display suspend blocker. */