diff options
| author | 2023-03-08 13:34:17 -0800 | |
|---|---|---|
| committer | 2023-03-08 19:54:32 -0800 | |
| commit | bd1e947f2f41c782b756d69f7e18653ecf7272fe (patch) | |
| tree | 1006bd793b813425385311bec68e5ee2773a7898 /wifi/java/src | |
| parent | 3521df06db71c084bb7c132b84e6ad45ca240f77 (diff) | |
OTA only adds Main if isMainUserPermanentAdmin
On OTA to Android U, we bestow upon one user the MainUser title. Not all
devices need to have a MainUser though, depnding on their configuration.
Nonetheless, we were previously always adding MainUser on OTA.
For HSUM devices that do NOT have config_isMainUserPermanentAdmin, we should
not be setting a MainUser on OTA, so we fix this here.
On non-HSUM, we continue to make user 0 the MainUser on OTA regardless
of configuration; non-HSUM user 0 being Main is just an invariant.
Moreover, we update the emulation logic to also take into account
config_isMainUserPermanentAdmin and the invariance.
The updated logic of emulation is:
non-HSUM -> emulate HSUM
Rule: in HSUM, we never have Sys be Main. We set a new main iff the config says to.
Scenarios:
* if main=Sys (usual phone case): Remove Main from system; if isMainUserPermanentAdmin(), switch/set a new Main.
* if no main (severly aberrant case): if isMainUserPermanentAdmin(), set a new Main.
* if main=other (aberrant case): leave as is
HSUM -> emulate non-HSUM
Rule: in non-HSUM, we always make Sys to be Main
Scenarios:
* if main=Sys (severely aberrant case): leave as is
* if no main (usual for Auto): always make Sys the Main
* if main=other (usual for tablet): always switch Main to system
Test: manual OTA from T to U
Test: manual emulate different modes
Bug: 272295293
Change-Id: Id915203fe07b65cdd0e7e08df92fe93454be4f6f
Diffstat (limited to 'wifi/java/src')
0 files changed, 0 insertions, 0 deletions