summaryrefslogtreecommitdiff
path: root/src/com/android/settings/development/OemUnlockPreferenceController.java
AgeCommit message (Collapse)Author
2020-07-241/n: Make ChooseLockSettingsHelper into a builderKevin Chyn
The multitude of slightly different launchConfirmationActivity(*) methods are a big unsustainable pyramid. It's too difficult to read, too difficult to track which clients are interested in which parameters, and too difficult to add new parameters, since we need to 1) Read through all of them and find one that's the closest 2) Try not to affect other callers, so potentially add yet another 3) Modify the internal paths, which all basically call each other until it reaches the biggest launchConfirmationActivity which has ALL of the parameters This change should have no behavioral change. Note: CredentialStorage doesn't need returnCredentials anymore as of ag/6073449 Test: make -j56 RunSettingsRoboTests Test: Manually traced code paths for each invocation. A few hidden dependencies (such as explicitly setting challenge=0 with hasChallenge=true) were found. Left them the way they were in case they were intended Test: Enroll face, fingerprint Test: Enable developer options Test: Change to PIN, Pattern, Password, then back to PIN (so each type requests confirmation) Test: adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL, authenticate Test: adb shell am start -a android.app.action.CONFIRM_FRP_CREDENTIAL (shows confirm credential screen) Fixes: 138453993 Change-Id: Ic82ef3c3ac2e14d624281921f2d816bcdacbd82b
2019-07-09Avoid oem-unlock preference controller crashMill Chen
Openning developer options will crash if the device doesn't support oem_unlock module. We added a condition to check that the oem_unlock_supported property is existing before getting OemLockManager. Fixes: 136108893 Test: robotests Test: lunch aosp_cf_x86_phone-eng; m dist; acloud create --local-image Test: lunch sdk_gphone_x86-eng; make; emulator Change-Id: I2c1821fbdd18e3e8162a492e1e15dd34c8aec803
2019-04-10Default to enable oem-unlocking preferenceMill Chen
Whether the device supports carriorlock or not, oem-unlocking preference will be enabled by default, except sdk_gphone_x86-eng target. Fixes: 129982117 Test: emulator, robotest Change-Id: I02af50e425fe5a93c244bbf8fe8bd2682275974f
2019-02-21Merge "developer-options: avoid oem-unlock preference controller crash"TreeHugger Robot
2019-02-21developer-options: avoid oem-unlock preference controller crashbohu
If there is no FEATURE_TELEPHONY_CARRIERLOCK. BUG: 123583878 Test: lunch sdk_phone_x86-eng make -j emulator the Settings->System->Developer options should not crash Test: make RunSettingsRoboTests ROBOTEST_FILTER=OemUnlockPreferenceControllerTest should all pass (12 tests: 11 existing and 1 new) Change-Id: I18c08c1ff1a7860616b0081ede4eb19dcfa8814b
2019-02-14Mass clean up: don't cast class when not needed.Fan Zhang
Bug: none Test: rebuild Change-Id: Ie3f58a3d5ae99ade28a33dcac80c18de90d4d5b2
2019-01-17Migrate all MetricsProto enums to SettingsEnumsFan Zhang
Bug: 122855168 Test: rebuild Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2018-08-28Sort importsFan Zhang
Having consistent import order will reduce chance of merge conflict between internal and external master Test: rebuild Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-06-18Reorder and clean up imports.Fan Zhang
Test: rebuild Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-04-20Migrate Settings to androidx.Aurimas Liutikas
Test: make Settings Bug: 76692459 Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-03-01Remove unnecessary onDeveloperOptionsSwitchEnabled/Disabled override.Doris Ling
- default implementation has been added in the super class to handle enabling/disabling the preference when the master developer options switch it turned on/off. Removing all subclass that originally implemented the methods that only contains the default behavior. Bug: 73955632 Test: make RunSettingsRoboTests Change-Id: I13c372c2ab498a5786b40cdc1ad3b5f3424abb5a
2017-11-28Move OemUnlockPreferenceControllerTest to sdk 26jeffreyhuang
Test: make RunSettingsRoboTests -j40 Change-Id: I25d96c82bd99c5c7adba6b6269f1a5735b22ca5b
2017-10-30Add a dialog when turning off oem unlock dialog.Fan Zhang
Change-Id: I93a93c0a110c2770d3701b5449c7939f941c7593 Fixes: 28199132 Test: robotests
2017-10-09Move DevOptionsPrefCtrl to SettingsLibjeffreyhuang
- Move DeveloperOptionsPreferenceController Bug: 34203528 Test: make RunSettingsRoboTests -j40 Change-Id: Ie434d479d8d3f7527ffce54f241ac2e090e0fc44
2017-09-20Add isAvailable check to devOptionsControllerjeffreyhuang
- This avoids the null check for PreferenceControllers where isAvailable() is not always true Bug: 34203528 Test: make RunSettingsRoboTests -j40 Change-Id: Ibed8bc6a2a812355c521620d77fb571c1fd8a649
2017-09-19Introduce OemUnlockPreferenceControllerjeffreyhuang
- Create new OemUnlockPreferenceController - Add new onActivityResult method in DeveloperOptionsController - Create controller inside the DashboardFragment - Port logic from DevelopmentSettings into the controller Bug: 34203528 Test: make RunSettingsRoboTests -j40 Change-Id: I0b1387b9547e7c9f2a1a0963421d0ebea55d9ff4