diff options
author | Daniel Sandler <dsandler@android.com> | 2013-10-03 17:20:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-10-03 17:20:21 +0000 |
commit | 0a660528374f0cf4fc24eb610ea048c99cbd27a1 (patch) | |
tree | 3e358bced85f53bf5f4946fdcce16c65ec5899b8 /core | |
parent | fe5bf7a7c7dcf3353c345d18471b90426d9404a3 (diff) | |
parent | 2fdb68b3c2ac5e72fdaa590eb70fca0c6a9f5ef0 (diff) | |
download | frameworks_base-0a660528374f0cf4fc24eb610ea048c99cbd27a1.zip frameworks_base-0a660528374f0cf4fc24eb610ea048c99cbd27a1.tar.gz frameworks_base-0a660528374f0cf4fc24eb610ea048c99cbd27a1.tar.bz2 |
Merge "Goo goo ga joob." into klp-dev
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/provider/Settings.java | 9 | ||||
-rw-r--r-- | core/java/com/android/internal/app/PlatLogoActivity.java | 10 |
2 files changed, 18 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 3769e1e..631a38f 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2407,6 +2407,15 @@ public final class Settings { public static final String POINTER_SPEED = "pointer_speed"; /** + * I am the lolrus. + * <p> + * Nonzero values indicate that the user has a bukkit. + * Backward-compatible with <code>PrefGetPreference(prefAllowEasterEggs)</code>. + * @hide + */ + public static final String EGG_MODE = "egg_mode"; + + /** * Settings to backup. This is here so that it's in the same place as the settings * keys and easy to update. * diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java index 76b8579..43bd735 100644 --- a/core/java/com/android/internal/app/PlatLogoActivity.java +++ b/core/java/com/android/internal/app/PlatLogoActivity.java @@ -21,6 +21,7 @@ import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.graphics.Typeface; +import android.provider.Settings; import android.os.Build; import android.os.Bundle; import android.os.Handler; @@ -151,6 +152,13 @@ public class PlatLogoActivity extends Activity { logo.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { + if (Settings.System.getLong(getContentResolver(), Settings.System.EGG_MODE, 0) + == 0) { + // For posterity: the moment this user unlocked the easter egg + Settings.System.putLong(getContentResolver(), + Settings.System.EGG_MODE, + System.currentTimeMillis()); + } try { startActivity(new Intent(Intent.ACTION_MAIN) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK @@ -158,7 +166,7 @@ public class PlatLogoActivity extends Activity { | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) .addCategory("com.android.internal.category.PLATLOGO")); } catch (ActivityNotFoundException ex) { - android.util.Log.e("PlatLogoActivity", "Couldn't find a piece of pie."); + android.util.Log.e("PlatLogoActivity", "Couldn't catch a break."); } finish(); return true; |