summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-08-31 16:18:31 -0400
committerDaniel Sandler <dsandler@android.com>2012-08-31 16:18:31 -0400
commit0bcf4adcde601aff7d3894de2603e1f2cae41f1a (patch)
tree7ec4b36ee2d725167c05eba5b159078a90b13dfa
parent0c9278d3c885d63ade01bf583b2bc43ba327837a (diff)
downloadframeworks_base-0bcf4adcde601aff7d3894de2603e1f2cae41f1a.zip
frameworks_base-0bcf4adcde601aff7d3894de2603e1f2cae41f1a.tar.gz
frameworks_base-0bcf4adcde601aff7d3894de2603e1f2cae41f1a.tar.bz2
Only show the BeanFlinger screensaver to the worthy.
(That is: you must have discovered the flying-jellybeans easter egg to gain permanent access to the Dreams version of same.) Change-Id: I65ce39c0ab5b61f492a3637e3c31b3c91f4f0f89
-rw-r--r--packages/SystemUI/AndroidManifest.xml6
-rw-r--r--packages/SystemUI/res/values/strings.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/BeanBag.java7
3 files changed, 14 insertions, 2 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index b185471..7176f32 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -167,7 +167,7 @@
android:name=".BeanBag"
android:exported="true"
android:label="BeanBag"
- android:icon="@drawable/redbeandroid"
+ android:icon="@drawable/redbean2"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true"
android:launchMode="singleInstance"
@@ -184,7 +184,9 @@
<service
android:name=".BeanBagDream"
android:exported="true"
- android:label="Beans in space">
+ android:label="@string/jelly_bean_dream_name"
+ android:enabled="false"
+ >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 5747f22..609d63b 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -397,4 +397,7 @@
<!-- Description of the button in the phone-style notification panel that controls auto-rotation, when auto-rotation is off. [CHAR LIMIT=NONE] -->
<string name="accessibility_rotation_lock_on_portrait">Screen is locked in portrait orientation.</string>
+
+ <!-- Name of the Jelly Bean platlogo screensaver -->
+ <string name="jelly_bean_dream_name">BeanFlinger</string>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/BeanBag.java b/packages/SystemUI/src/com/android/systemui/BeanBag.java
index 616d72f..f5a90ca 100644
--- a/packages/SystemUI/src/com/android/systemui/BeanBag.java
+++ b/packages/SystemUI/src/com/android/systemui/BeanBag.java
@@ -24,6 +24,7 @@ import android.app.Activity;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageManager;
import android.graphics.drawable.AnimationDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.Bitmap;
@@ -40,6 +41,7 @@ import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Handler;
import android.os.SystemClock;
+import android.provider.Settings;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.util.Pair;
@@ -402,6 +404,11 @@ public class BeanBag extends Activity {
public void onStart() {
super.onStart();
+ // ACHIEVEMENT UNLOCKED
+ PackageManager pm = getPackageManager();
+ pm.setComponentEnabledSetting(new ComponentName(this, BeanBagDream.class),
+ PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
+
getWindow().addFlags(
WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED