diff options
author | Bill Lin <lbill@google.com> | 2021-06-25 12:42:43 +0800 |
---|---|---|
committer | Bill Lin <lbill@google.com> | 2021-06-28 08:30:01 +0800 |
commit | 6061ddc2f7a7633df145e97f53f8350ddb99f653 (patch) | |
tree | 5d639f704e1a2b4476c8f3c930bcf2467450c84d /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 3245ab133d6a3fb3dbf8f60752a9a3f7970b1a37 (diff) |
Check shortcut enabled before auto trun on OHM
When device (factory)boot, controller regsiter settings
'one_handed_mode_activated' will receive callback, and
the shortcut do not enabled by default, the flow will
go to auto enable one-handed mode feature and leading
unexpedted UX(disabled by default) and testing issue.
Solution:
- Add additional check for shortcut enabled when
onActivatedActionChanged() callback.
- When setting is pull screen, notify shortcut
one_handed_mode_activated to reset and align current
mState when function enabled.
Note:
The setting provider one_handed_mode_activated could set
2 different values when shortcut button pressed
- "0" mapping to pull screen STATE_NONE
- "1" mapping to pull screen STATE_ACTIVE
Since show notification do not have state, whenever
onChange callback, we trigger expand notification.
Test: atest WMShellUnitTests
Test: manual factory reset | reboot check Log should show \
"Shortcut not enabled, skip onActivatedActionChanged()".
Test: manual disable both OHM & shortcut toggle in settings \
'# adb shell settings --user 0 put secure \
one_handed_mode_activated 1'
should not auto enable OHM main toggle.
Bug: 191736174
Bug: 191831415
Bug: 191950195
Fixes: 191812697
Change-Id: Ib9d66fbbcc7e6a52a37bb47efebf90c9d2644508
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions