diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-08-19 18:11:51 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-08-19 18:21:31 -0700 |
commit | 4749fcf762de0e34ac28f927501d42555062c521 (patch) | |
tree | f37586d2e8cd37a3cd2781d103244ea7ad7f68cb /src | |
parent | a712c3b7b5a17129d016ede082e3e3b2bbd31f9a (diff) | |
download | packages_apps_Settings-4749fcf762de0e34ac28f927501d42555062c521.zip packages_apps_Settings-4749fcf762de0e34ac28f927501d42555062c521.tar.gz packages_apps_Settings-4749fcf762de0e34ac28f927501d42555062c521.tar.bz2 |
More tricksy.
Change-Id: I4752344e0eea302ba28e907ff5bd5c20f74a82b7
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/DeviceInfoSettings.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/com/android/settings/DeviceInfoSettings.java b/src/com/android/settings/DeviceInfoSettings.java index a2c22ab..048d10a 100644 --- a/src/com/android/settings/DeviceInfoSettings.java +++ b/src/com/android/settings/DeviceInfoSettings.java @@ -19,6 +19,7 @@ package com.android.settings; import android.content.Intent; import android.os.Build; import android.os.Bundle; +import android.os.SystemClock; import android.os.SystemProperties; import android.preference.Preference; import android.preference.PreferenceActivity; @@ -45,6 +46,8 @@ public class DeviceInfoSettings extends PreferenceActivity { private static final String KEY_SYSTEM_UPDATE_SETTINGS = "system_update_settings"; private static final String PROPERTY_URL_SAFETYLEGAL = "ro.url.safetylegal"; + long[] mHits = new long[3]; + @Override protected void onCreate(Bundle icicle) { super.onCreate(icicle); @@ -90,12 +93,16 @@ public class DeviceInfoSettings extends PreferenceActivity { @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { if (preference.getKey().equals("firmware_version")) { - Intent intent = new Intent(Intent.ACTION_MAIN); - intent.setClassName("android", - com.android.internal.app.PlatLogoActivity.class.getName()); - try { - startActivity(intent); - } catch (Exception e) { + 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.setClassName("android", + com.android.internal.app.PlatLogoActivity.class.getName()); + try { + startActivity(intent); + } catch (Exception e) { + } } } return super.onPreferenceTreeClick(preferenceScreen, preference); |