Skip to content
Commit 4a5dd788 authored by Christian Göllner's avatar Christian Göllner
Browse files

Foldable rotation settings: persist postures instead of device states

Device state ids can change, and therefore shouldn't be persisted. We
define our custom ids for device postures, which will not change.

1. We define our custom posture ids in Settings.Secure. These match
   the current device state ids. This way we don't have to wipe users'
   settings.
2. We convert device ids to postures, based on the config arrays
   "config_foldedDeviceStates", "config_halfFoldedDeviceStates", and
   "config_openDeviceStates".

Test: unit tests
Test: manually by trying the different auto-rotation scenarios in
      different postures.
Fixes: 261968395
Change-Id: I396e9c92230e75e186b6a70198ee16b41e508a1e
parent 4626fa48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment