Merge "Only show the BeanFlinger screensaver to the worthy." into jb-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e32bb6c9c6
@@ -167,7 +167,7 @@
|
|||||||
android:name=".BeanBag"
|
android:name=".BeanBag"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="BeanBag"
|
android:label="BeanBag"
|
||||||
android:icon="@drawable/redbeandroid"
|
android:icon="@drawable/redbean2"
|
||||||
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
|
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
|
||||||
android:hardwareAccelerated="true"
|
android:hardwareAccelerated="true"
|
||||||
android:launchMode="singleInstance"
|
android:launchMode="singleInstance"
|
||||||
@@ -184,7 +184,9 @@
|
|||||||
<service
|
<service
|
||||||
android:name=".BeanBagDream"
|
android:name=".BeanBagDream"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="Beans in space">
|
android:label="@string/jelly_bean_dream_name"
|
||||||
|
android:enabled="false"
|
||||||
|
>
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.DEFAULT" />
|
<category android:name="android.intent.category.DEFAULT" />
|
||||||
|
|||||||
@@ -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] -->
|
<!-- 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>
|
<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>
|
</resources>
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import android.app.Activity;
|
|||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.drawable.AnimationDrawable;
|
import android.graphics.drawable.AnimationDrawable;
|
||||||
import android.graphics.drawable.BitmapDrawable;
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@@ -40,6 +41,7 @@ import android.graphics.Rect;
|
|||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
import android.provider.Settings;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
@@ -402,6 +404,11 @@ public class BeanBag extends Activity {
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
||||||
|
// ACHIEVEMENT UNLOCKED
|
||||||
|
PackageManager pm = getPackageManager();
|
||||||
|
pm.setComponentEnabledSetting(new ComponentName(this, BeanBagDream.class),
|
||||||
|
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0);
|
||||||
|
|
||||||
getWindow().addFlags(
|
getWindow().addFlags(
|
||||||
WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
|
WindowManager.LayoutParams.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON
|
||||||
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
|
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
|
||||||
|
|||||||
Reference in New Issue
Block a user