Add per-app controls for compat fake focus
Per-package controls introduced in this change: - OVERRIDE_ENABLE_COMPAT_FAKE_FOCUS for device manufactures to opt in a package to receive compat fake focus. - com.android.COMPAT_FAKE_FOCUS_OPT_IN for app developers to opt in via component property to receive compat fake focus. - com.android.COMPAT_FAKE_FOCUS_OPT_OUT for app developers to opt out via component property from receiving compat fake focus. This change is needed because some game engines wait to get focus before drawing the content of the app so fake focus helps them to avoid staying blacked out when they are resumed and do not have focus yet. Fix: 261828290 Fix: 263259275 Test: atest WmTests:LetterboxConfigurationTest#testIsFakeFocusEnabledOnDevice Test: atest WmTests:SizeCompatTests#testShouldSendFakeFocus_overrideEnabled_returnsTrue Test: atest WmTests:SizeCompatTests#testShouldSendFakeFocus_overrideDisabled_returnsFalse Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optOutPropertyEnabled_overrideEnabled_fakeFocusDisabled Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optInPropertyEnabled_overrideDisabled_fakeFocusEnabled Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optOutPropertyEnabled_fakeFocusDisabled Test: atest WmTests:SizeCompatTests#testIsFakeFocusEnabled_optInPropertyEnabled_fakeFocusEnabled Change-Id: Ib16084728bc0d5870c8d2effc5dd0d54bfe04d24
Loading
Please register or sign in to comment