Skip to content

Commit dc44253

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Ice cream is SO over." into jb-dev
2 parents c2e393f + 1a0c914 commit dc44253

36 files changed

+467
-358
lines changed

core/java/com/android/internal/app/PlatLogoActivity.java

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -29,64 +29,43 @@
2929
import android.widget.Toast;
3030

3131
public class PlatLogoActivity extends Activity {
32-
Vibrator mZzz;
3332
Toast mToast;
3433
ImageView mContent;
3534
int mCount;
3635
final Handler mHandler = new Handler();
3736

38-
Runnable mSuperLongPress = new Runnable() {
39-
public void run() {
40-
mCount++;
41-
mZzz.vibrate(50 * mCount);
42-
final float scale = 1f + 0.25f * mCount * mCount;
43-
mContent.setScaleX(scale);
44-
mContent.setScaleY(scale);
45-
46-
if (mCount <= 3) {
47-
mHandler.postDelayed(mSuperLongPress, ViewConfiguration.getLongPressTimeout());
48-
} else {
49-
try {
50-
startActivity(new Intent(Intent.ACTION_MAIN)
51-
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
52-
| Intent.FLAG_ACTIVITY_CLEAR_TASK
53-
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
54-
.setClassName("com.android.systemui","com.android.systemui.Nyandroid"));
55-
} catch (ActivityNotFoundException ex) {
56-
android.util.Log.e("PlatLogoActivity", "Couldn't find platlogo screensaver.");
57-
}
58-
finish();
59-
}
60-
}
61-
};
62-
6337
@Override
6438
protected void onCreate(Bundle savedInstanceState) {
6539
super.onCreate(savedInstanceState);
6640

67-
mZzz = (Vibrator)getSystemService(VIBRATOR_SERVICE);
68-
mToast = Toast.makeText(this, "Android 4.0: Ice Cream Sandwich", Toast.LENGTH_SHORT);
41+
mToast = Toast.makeText(this, "Android X.X: Jelly Bean", Toast.LENGTH_SHORT);
6942

7043
mContent = new ImageView(this);
7144
mContent.setImageResource(com.android.internal.R.drawable.platlogo);
7245
mContent.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
7346

74-
mContent.setOnTouchListener(new View.OnTouchListener() {
47+
mContent.setOnClickListener(new View.OnClickListener() {
7548
@Override
76-
public boolean onTouch(View v, MotionEvent event) {
77-
final int action = event.getAction();
78-
if (action == MotionEvent.ACTION_DOWN) {
79-
mContent.setPressed(true);
80-
mHandler.removeCallbacks(mSuperLongPress);
81-
mCount = 0;
82-
mHandler.postDelayed(mSuperLongPress, 2*ViewConfiguration.getLongPressTimeout());
83-
} else if (action == MotionEvent.ACTION_UP) {
84-
if (mContent.isPressed()) {
85-
mContent.setPressed(false);
86-
mHandler.removeCallbacks(mSuperLongPress);
87-
mToast.show();
88-
}
49+
public void onClick(View v) {
50+
mToast.show();
51+
mContent.setImageResource(com.android.internal.R.drawable.platlogo_alt);
52+
}
53+
});
54+
55+
mContent.setOnLongClickListener(new View.OnLongClickListener() {
56+
@Override
57+
public boolean onLongClick(View v) {
58+
try {
59+
startActivity(new Intent(Intent.ACTION_MAIN)
60+
.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
61+
| Intent.FLAG_ACTIVITY_CLEAR_TASK
62+
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
63+
.addCategory("com.android.internal.category.PLATLOGO"));
64+
//.setClassName("com.android.systemui","com.android.systemui.BeanBag"));
65+
} catch (ActivityNotFoundException ex) {
66+
android.util.Log.e("PlatLogoActivity", "Couldn't find a bag of beans.");
8967
}
68+
finish();
9069
return true;
9170
}
9271
});
70 Bytes
Loading
52 Bytes
Loading
40 Bytes
Loading
36.8 KB
Loading
43.5 KB
Loading
-21 Bytes
Loading

core/res/res/values/public.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@
980980
<java-symbol type="drawable" name="jog_tab_target_gray" />
981981
<java-symbol type="drawable" name="picture_emergency" />
982982
<java-symbol type="drawable" name="platlogo" />
983+
<java-symbol type="drawable" name="platlogo_alt" />
983984
<java-symbol type="drawable" name="stat_notify_sync_error" />
984985
<java-symbol type="drawable" name="stat_notify_wifi_in_range" />
985986
<java-symbol type="drawable" name="stat_sys_gps_on" />

packages/SystemUI/AndroidManifest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,19 @@
161161

162162
<!-- started from ... somewhere -->
163163
<activity
164-
android:name=".Nyandroid"
164+
android:name=".BeanBag"
165165
android:exported="true"
166-
android:label="Nyandroid"
167-
android:icon="@drawable/nyandroid04"
168-
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
166+
android:label="BeanBag"
167+
android:icon="@drawable/redbeandroid"
168+
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
169169
android:hardwareAccelerated="true"
170170
android:launchMode="singleInstance"
171171
android:excludeFromRecents="true">
172172
<intent-filter>
173173
<action android:name="android.intent.action.MAIN" />
174174
<category android:name="android.intent.category.DEFAULT" />
175-
<!-- <category android:name="android.intent.category.DREAM" />-->
175+
<category android:name="com.android.internal.category.PLATLOGO" />
176+
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
176177
</intent-filter>
177178
</activity>
178179
</application>
15 KB
Loading

0 commit comments

Comments
 (0)