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

Commit d270f29c authored by Jack Yu's avatar Jack Yu
Browse files

Show reboot dialog when users disable developer options

When NFC detailed logging mechanisms are enabled and users try to
disable develoepr options, show reboot request dialog to make sure
NFC logging mechanisms are also disabled.

Bug: 204397062
Test: manual
Change-Id: I531c85fd77934ad7821c480df07465a8cd8f24f9
parent 3d2aff89
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -300,10 +300,19 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
                final BluetoothLeAudioHwOffloadPreferenceController leAudioController =
                        getDevelopmentOptionsController(
                                BluetoothLeAudioHwOffloadPreferenceController.class);
                final NfcSnoopLogPreferenceController nfcSnoopLogController =
                        getDevelopmentOptionsController(
                                NfcSnoopLogPreferenceController.class);
                final NfcVerboseVendorLogPreferenceController nfcVerboseLogController =
                        getDevelopmentOptionsController(
                                NfcVerboseVendorLogPreferenceController.class);
                // If hardware offload isn't default value, we must reboot after disable
                // developer options. Show a dialog for the user to confirm.
                if ((a2dpController == null || a2dpController.isDefaultValue())
                        && (leAudioController == null || leAudioController.isDefaultValue())) {
                        && (leAudioController == null || leAudioController.isDefaultValue())
                        && (nfcSnoopLogController == null || nfcSnoopLogController.isDefaultValue())
                        && (nfcVerboseLogController == null
                        || nfcVerboseLogController.isDefaultValue())) {
                    disableDeveloperOptions();
                } else {
                    DisableDevSettingsDialogFragment.show(this /* host */);