Show the warning toast when the brightness slider unable to control
As the top app can use WindowManager.LayoutParams.screenBrightness to
set the preferred brightness value on the foreground window, in that
case the user won't be aware the brightness slider will no-op when the
brightness value has been controlled by the application side.
With this CL, SystemUI will show the warning toast to better
understanding the reason of why unable controlling brightness value
through the brightness slider.
Flag: com.android.systemui.show_toast_when_app_control_brightness
Bug: 363225340
Test: atest -d PlatformScenarioTests:SwipeBrightnessShowToast
Test: atest SystemUITests:BrightnessControllerTest
Test: atest BrightnessClamperControllerTest
Test: manual as the issue step:
1) Open Netflix and starts a video playback
2. Swipe the brightness slider, expect a warning toast will
be shown when the app controls screenBrightness value.
Change-Id: I57eb1371c2e7e637dc8a01813029a29046ef83f5
24 files changed