Add waive_target_sdk_check_for_turn_screen_on PowerProperties sysprop. This is added to allow for more strict enforcement of android.permission.TURN_SCREEN_ON on TV. Bug: 281825732 Test: manually installed app with targetSdk T and verified that it can turn the screen on Test: set waive_target_sdk_check_for_turn_screen_on to true and verified that app with targetSdk T cannot turn the screen on Change-Id: I307a36e26331c2cb5d988ccb70665964c3344665
diff --git a/srcs/android/sysprop/PowerProperties.sysprop b/srcs/android/sysprop/PowerProperties.sysprop index ddb72b6..c53d6ae 100644 --- a/srcs/android/sysprop/PowerProperties.sysprop +++ b/srcs/android/sysprop/PowerProperties.sysprop
@@ -44,3 +44,13 @@ access: ReadWrite prop_name: "debug.power.permissionless_turn_screen_on" } + +# Waives the minimum target-sdk check for android.os.PowerManager#ACQUIRE_CAUSES_WAKEUP +# and only allows the flag for apps holding android.permission.TURN_SCREEN_ON +prop { + api_name: "waive_target_sdk_check_for_turn_screen_on" + type: Boolean + scope: Internal + access: Readonly + prop_name: "ro.power.waive_target_sdk_check_for_turn_screen_on" +} \ No newline at end of file