diff options
author | Danesh Mondegarian <daneshm90@gmail.com> | 2012-12-09 16:59:15 -0500 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2015-12-08 06:59:08 -0800 |
commit | b5500240eb1f5685ce5ea22eb195a16b1832be76 (patch) | |
tree | 25dcb3626040946b93bc86ee25228642793afed7 /src/com | |
parent | a2246fbd2e9cb0859c88148a34a7f5800a747924 (diff) | |
download | packages_apps_Settings-b5500240eb1f5685ce5ea22eb195a16b1832be76.zip packages_apps_Settings-b5500240eb1f5685ce5ea22eb195a16b1832be76.tar.gz packages_apps_Settings-b5500240eb1f5685ce5ea22eb195a16b1832be76.tar.bz2 |
CM PlatLogo: CyanogenMod version preference (2/2)
Binds the CyanogenMod version preference to launch CM easter egg
upon multiple taps.
Change-Id: I8e06642944d24581c0932c9964f2d9615bfcb832
Diffstat (limited to 'src/com')
-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 5921fef..6ee17c5 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -297,6 +297,20 @@ public class DeviceInfoSettings extends SettingsPreferenceFragment implements In if (b.getBoolean(CarrierConfigManager.KEY_CI_ACTION_ON_SYS_UPDATE_BOOL)) { ciActionOnSysUpdate(b); } + } else if (preference.getKey().equals(KEY_MOD_VERSION)) { + 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.ACTION_MAIN); + intent.putExtra("is_cm", true); + intent.setClassName("android", + com.android.internal.app.PlatLogoActivity.class.getName()); + try { + startActivity(intent); + } catch (Exception e) { + Log.e(LOG_TAG, "Unable to start activity " + intent.toString()); + } + } } return super.onPreferenceTreeClick(preferenceScreen, preference); } |