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

Commit 4ea7b253 authored by kaiyiz's avatar kaiyiz
Browse files

Settings:The Developer option is not hidden after invoking it.

Enable developer option by clicking on "build number" 7 times.

CRs-Fixed: 757980

Change-Id: I612cc26ff5045ca83e48fdcc65f21b59fdb7f81f
parent acf71eee
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -83,8 +83,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
    private static final String KEY_SAFETY_LEGAL = "safetylegal";
    private static final String KEY_STATUS = "status_info";

    static final int TAPS_TO_BE_A_DEVELOPER_NORMALLY = 5;
    static final int TAPS_TO_BE_A_DEVELOPER_IN_HIDDEN_MODE = 7;
    static final int TAPS_TO_BE_A_DEVELOPER = 7;
    private static boolean mHideVersionName = false;

    long[] mHits = new long[3];
@@ -207,9 +206,8 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
        super.onResume();
        mDevHitCountdown = getActivity().getSharedPreferences(DevelopmentSettings.PREF_FILE,
                Context.MODE_PRIVATE).getBoolean(DevelopmentSettings.PREF_SHOW,
                        android.os.Build.TYPE.equals("eng")) ? -1 : (isHiddenDeveloper() ?
                                TAPS_TO_BE_A_DEVELOPER_IN_HIDDEN_MODE :
                                        TAPS_TO_BE_A_DEVELOPER_NORMALLY);
                        android.os.Build.TYPE.equals("eng")) ? -1 : TAPS_TO_BE_A_DEVELOPER;

        mDevHitToast = null;
    }

@@ -257,9 +255,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In
                                    DevelopmentSettings.class.getName(), true, true);

                } else if (mDevHitCountdown > 0
                        && mDevHitCountdown < ((isHiddenDeveloper() ?
                                TAPS_TO_BE_A_DEVELOPER_IN_HIDDEN_MODE :
                                        TAPS_TO_BE_A_DEVELOPER_NORMALLY)-2)) {
                        && mDevHitCountdown < (TAPS_TO_BE_A_DEVELOPER-2)) {
                    if (mDevHitToast != null) {
                        mDevHitToast.cancel();
                    }