diff options
author | Danesh M <daneshm90@gmail.com> | 2015-12-18 12:00:27 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-12-18 13:49:46 -0800 |
commit | ff9cea3ce65b02ba91321ddb6868c1c844b65840 (patch) | |
tree | db90d1f9e95d4c791b9f3545da641ca2f9611f32 | |
parent | 7cb203df130dcc391a0e5a10e2698d2a14a044ce (diff) | |
download | packages_apps_Settings-ff9cea3ce65b02ba91321ddb6868c1c844b65840.zip packages_apps_Settings-ff9cea3ce65b02ba91321ddb6868c1c844b65840.tar.gz packages_apps_Settings-ff9cea3ce65b02ba91321ddb6868c1c844b65840.tar.bz2 |
Settings : Launch demo mode on triple tap of build date
Change-Id: I85341ad7f9c8bba107e26e5e12924906466b0c76
-rw-r--r-- | src/com/android/settings/DeviceInfoSettings.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java index 6ee17c5..dfa084f 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -140,6 +140,7 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In setValueSummary(KEY_MOD_BUILD_DATE, "ro.build.date"); setExplicitValueSummary(KEY_MOD_API_LEVEL, constructApiLevelString()); findPreference(KEY_MOD_API_LEVEL).setEnabled(true); + findPreference(KEY_MOD_BUILD_DATE).setEnabled(true); if (!SELinux.isSELinuxEnabled()) { String status = getResources().getString(R.string.selinux_status_disabled); @@ -246,6 +247,19 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In Log.e(LOG_TAG, "Unable to start activity " + intent.toString()); } } + } else if (preference.getKey().equals(KEY_MOD_BUILD_DATE)) { + System.arraycopy(mHits, 1, mHits, 0, mHits.length-1); + mHits[mHits.length-1] = SystemClock.uptimeMillis(); + if (mHits[0] >= (SystemClock.uptimeMillis()-500)) { + Intent intent = new Intent(); + intent.setClassName("com.android.systemui", + "com.android.systemui.tuner.TunerActivity$DemoModeActivity"); + try { + startActivity(intent); + } catch (Exception e) { + Log.e(LOG_TAG, "Unable to start activity " + intent.toString()); + } + } } else if (preference.getKey().equals(KEY_BUILD_NUMBER)) { // Don't enable developer options for secondary users. if (UserHandle.myUserId() != UserHandle.USER_OWNER) return true; |