Use SecurityLevel integration on android
In !1522 (merged) we decided to delay using the android integration proposed in !1520 (merged).
This issue tracks:
- Stop using android-only preferences for the security level.
SecurityLevel.sys.mjsis the complete manager of these preferences. - Use the level name ("standard", "safer", "safest") instead of integers (
4,2,1). - Read and write to
SecurityLevel.sys.mjsvia theEVENT_SECURITY_LEVEL_GETandEVENT_SECURITY_LEVEL_SET_BEFORE_RESTART. - In the latter case, wait for the event to resolve before we trigger the application restart to make our implementation more stable.