Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fb2d3b7a authored by Shawn Willden's avatar Shawn Willden
Browse files

Catch security exception on isOemUnlockAllowed

As of Android 15, devices with FRP active will throw an exception when loading developer options attempts to update the OEM unlock state, which causes the app to crash.  This CL just catches the exception and reports that OEM unlock is not, in fact, settable.

A full fix should probably tell the user that OEM unlock may not be set because FRP is active, rather than just quietly failing and logging the situation, but because GMS Core is soon going to begin blocking access to the Android UI when FRP is active, meaning that developer options won't even be reachable and the user will be informed about FRP state by GMS Core, the effort that would require isn't justified.

Note that this CL does not add a test for this change because it is not possible for CTS to put the device in FRP-active state to test the relevant case.  Manual testing is required.

Test: SettingsUnitTests
Flag: EXEMPT bugfix
Bug: 405023810
Change-Id: Ic43de93a4208bbc17f2e287d52f9baf281cd678c
parent 081fab13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment