diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java
index 80bc5feac4c40..49230c107c3eb 100644
--- a/core/java/com/android/internal/app/PlatLogoActivity.java
+++ b/core/java/com/android/internal/app/PlatLogoActivity.java
@@ -45,33 +45,11 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
public class PlatLogoActivity extends Activity {
- final static int[] FLAVORS = {
- 0xFF9C27B0, 0xFFBA68C8, // grape
- 0xFFFF9800, 0xFFFFB74D, // orange
- 0xFFF06292, 0xFFF8BBD0, // bubblegum
- 0xFFAFB42B, 0xFFCDDC39, // lime
- 0xFFFFEB3B, 0xFFFFF176, // lemon
- 0xFF795548, 0xFFA1887F, // mystery flavor
- };
FrameLayout mLayout;
int mTapCount;
int mKeyCount;
PathInterpolator mInterpolator = new PathInterpolator(0f, 0f, 0.5f, 1f);
- static int newColorIndex() {
- return 2*((int) (Math.random()*FLAVORS.length/2));
- }
-
- Drawable makeRipple() {
- final int idx = newColorIndex();
- final ShapeDrawable popbg = new ShapeDrawable(new OvalShape());
- popbg.getPaint().setColor(FLAVORS[idx]);
- final RippleDrawable ripple = new RippleDrawable(
- ColorStateList.valueOf(FLAVORS[idx+1]),
- popbg, null);
- return ripple;
- }
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -87,120 +65,62 @@ public class PlatLogoActivity extends Activity {
final int size = (int)
(Math.min(Math.min(dm.widthPixels, dm.heightPixels), 600*dp) - 100*dp);
- final View stick = new View(this) {
- Paint mPaint = new Paint();
- Path mShadow = new Path();
-
- @Override
- public void onAttachedToWindow() {
- super.onAttachedToWindow();
- setWillNotDraw(false);
- setOutlineProvider(new ViewOutlineProvider() {
- @Override
- public void getOutline(View view, Outline outline) {
- outline.setRect(0, getHeight() / 2, getWidth(), getHeight());
- }
- });
- }
- @Override
- public void onDraw(Canvas c) {
- final int w = c.getWidth();
- final int h = c.getHeight() / 2;
- c.translate(0, h);
- final GradientDrawable g = new GradientDrawable();
- g.setOrientation(GradientDrawable.Orientation.LEFT_RIGHT);
- g.setGradientCenter(w * 0.75f, 0);
- g.setColors(new int[] { 0xFFFFFFFF, 0xFFAAAAAA });
- g.setBounds(0, 0, w, h);
- g.draw(c);
- mPaint.setColor(0xFFAAAAAA);
- mShadow.reset();
- mShadow.moveTo(0,0);
- mShadow.lineTo(w, 0);
- mShadow.lineTo(w, size/2 + 1.5f*w);
- mShadow.lineTo(0, size/2);
- mShadow.close();
- c.drawPath(mShadow, mPaint);
- }
- };
- mLayout.addView(stick, new FrameLayout.LayoutParams((int) (32 * dp),
- ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER_HORIZONTAL));
- stick.setAlpha(0f);
-
- final ImageView im = new ImageView(this);
+ final View im = new View(this);
im.setTranslationZ(20);
- im.setScaleX(0);
- im.setScaleY(0);
+ im.setScaleX(0.5f);
+ im.setScaleY(0.5f);
+ im.setAlpha(0f);
+ im.setOutlineProvider(new ViewOutlineProvider() {
+ @Override
+ public void getOutline(View view, Outline outline) {
+ final int pad = (int) (8*dp);
+ outline.setOval(pad, pad, view.getWidth()-pad, view.getHeight()-pad);
+ }
+ });
final Drawable platlogo = getDrawable(com.android.internal.R.drawable.platlogo);
- platlogo.setAlpha(0);
- im.setImageDrawable(platlogo);
- im.setBackground(makeRipple());
+ im.setBackground(new RippleDrawable(
+ ColorStateList.valueOf(0xFFFFFFFF),
+ platlogo,
+ null));
im.setClickable(true);
- final ShapeDrawable highlight = new ShapeDrawable(new OvalShape());
- highlight.getPaint().setColor(0x10FFFFFF);
- highlight.setBounds((int)(size*.15f), (int)(size*.15f),
- (int)(size*.6f), (int)(size*.6f));
- im.getOverlay().add(highlight);
im.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (mTapCount == 0) {
- im.animate()
- .translationZ(40)
- .scaleX(1)
- .scaleY(1)
- .setInterpolator(mInterpolator)
- .setDuration(700)
- .setStartDelay(500)
- .start();
+ im.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ if (mTapCount < 5) return false;
- final ObjectAnimator a = ObjectAnimator.ofInt(platlogo, "alpha", 0, 255);
- a.setInterpolator(mInterpolator);
- a.setStartDelay(1000);
- a.start();
-
- stick.animate()
- .translationZ(20)
- .alpha(1)
- .setInterpolator(mInterpolator)
- .setDuration(700)
- .setStartDelay(750)
- .start();
-
- im.setOnLongClickListener(new View.OnLongClickListener() {
- @Override
- public boolean onLongClick(View v) {
- if (mTapCount < 5) return false;
-
- final ContentResolver cr = getContentResolver();
- if (Settings.System.getLong(cr, Settings.System.EGG_MODE, 0)
- == 0) {
- // For posterity: the moment this user unlocked the easter egg
+ final ContentResolver cr = getContentResolver();
+ if (Settings.System.getLong(cr, Settings.System.EGG_MODE, 0)
+ == 0) {
+ // For posterity: the moment this user unlocked the easter egg
+ try {
Settings.System.putLong(cr,
Settings.System.EGG_MODE,
System.currentTimeMillis());
+ } catch (RuntimeException e) {
+ Log.e("PlatLogoActivity", "Can't write settings", e);
}
- im.post(new Runnable() {
- @Override
- public void run() {
- try {
- startActivity(new Intent(Intent.ACTION_MAIN)
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_CLEAR_TASK
- | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
- .addCategory("com.android.internal.category.PLATLOGO"));
- } catch (ActivityNotFoundException ex) {
- Log.e("PlatLogoActivity", "No more eggs.");
- }
- finish();
- }
- });
- return true;
}
- });
- } else {
- im.setBackground(makeRipple());
- }
+ im.post(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ startActivity(new Intent(Intent.ACTION_MAIN)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_CLEAR_TASK
+ | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
+ .addCategory("com.android.internal.category.PLATLOGO"));
+ } catch (ActivityNotFoundException ex) {
+ Log.e("PlatLogoActivity", "No more eggs.");
+ }
+ finish();
+ }
+ });
+ return true;
+ }
+ });
mTapCount++;
}
});
@@ -229,7 +149,7 @@ public class PlatLogoActivity extends Activity {
mLayout.addView(im, new FrameLayout.LayoutParams(size, size, Gravity.CENTER));
- im.animate().scaleX(0.3f).scaleY(0.3f)
+ im.animate().scaleX(1f).scaleY(1f).alpha(1f)
.setInterpolator(mInterpolator)
.setDuration(500)
.setStartDelay(800)
diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml
index 65cb0464deeca..f5d945ada52b4 100644
--- a/core/res/res/drawable-nodpi/platlogo.xml
+++ b/core/res/res/drawable-nodpi/platlogo.xml
@@ -14,35 +14,30 @@ Copyright (C) 2014 The Android Open Source Project
limitations under the License.
-->
+ android:width="480dp"
+ android:height="480dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
+
+
+
+ android:pathData="M24.0,24.0L14.0,14.0l0.0,10.0l10.0,10.0c0.0,0.0 0.0,-2.2 0.0,-5.0S24.0,24.0 24.0,24.0z"
+ android:fillColor="#EEEEEE"/>
+ android:pathData="M14.0,34.0l10.0,0.0 -10.0,-10.0z"
+ android:fillColor="#DDDDDD"/>
-
-
-
-
-
+ android:pathData="M34.0,34.0l0.0,-10.0 -10.0,10.0z"
+ android:fillColor="#DDDDDD"/>
diff --git a/core/res/res/drawable-nodpi/stat_sys_adb.xml b/core/res/res/drawable-nodpi/stat_sys_adb.xml
index d89d1f922a0e1..8f5109df48040 100644
--- a/core/res/res/drawable-nodpi/stat_sys_adb.xml
+++ b/core/res/res/drawable-nodpi/stat_sys_adb.xml
@@ -19,9 +19,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
-
+ android:fillColor="#FF000000"
+ android:pathData="M12.0,12.0l-10.0,-10.0 0.0,10.0 0.0,10.0 10.0,0.0 10.0,0.0 0.0,-10.0 0.0,-10.0z"/>
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 9d6d937e1883f..e47c7a0cb2210 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -184,16 +184,17 @@
+ android:value="com.android.settings.category.system" />
@@ -316,6 +317,19 @@
android:screenOrientation="locked"
android:process=":sweetsweetdesserts"
android:excludeFromRecents="true">
+
+
+
+
+
+
+
diff --git a/packages/SystemUI/res/drawable-nodpi/icon.xml b/packages/SystemUI/res/drawable-nodpi/icon.xml
index dc1e6339119b0..7b8975a45427b 100644
--- a/packages/SystemUI/res/drawable-nodpi/icon.xml
+++ b/packages/SystemUI/res/drawable-nodpi/icon.xml
@@ -14,47 +14,30 @@ Copyright (C) 2014 The Android Open Source Project
limitations under the License.
-->
+ android:width="48.0dp"
+ android:height="48.0dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
+ android:pathData="M24.0,2.0C11.8,2.0 2.0,11.8 2.0,24.0c0.0,6.1 2.5,11.6 6.4,15.6L39.6,8.4C35.6,4.5 30.1,2.0 24.0,2.0z"
+ android:fillColor="#F57C00"/>
+ android:pathData="M39.6,8.4L8.4,39.6c4.0,4.0 9.5,6.4 15.6,6.4c12.2,0.0 22.0,-9.8 22.0,-22.0C46.0,17.9 43.5,12.4 39.6,8.4z"
+ android:fillColor="#FF9800"/>
+ android:pathData="M45.9,25.9L34.0,14.0L14.0,34.0l11.9,11.9C36.5,45.0 45.0,36.5 45.9,25.9z"
+ android:fillAlpha="0.33"
+ android:fillColor="#F57C00"/>
-
+ android:pathData="M24.0,24.0L14.0,14.0l0.0,10.0l10.0,10.0c0.0,0.0 0.0,-2.2 0.0,-5.0S24.0,24.0 24.0,24.0z"
+ android:fillColor="#EEEEEE"/>
+ android:pathData="M14.0,34.0l10.0,0.0 -10.0,-10.0z"
+ android:fillColor="#DDDDDD"/>
-
-
-
-
-
+ android:pathData="M34.0,34.0l0.0,-10.0 -10.0,10.0z"
+ android:fillColor="#DDDDDD"/>
diff --git a/packages/SystemUI/res/drawable-nodpi/tuner.xml b/packages/SystemUI/res/drawable-nodpi/tuner.xml
new file mode 100644
index 0000000000000..e27423f275e1b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-nodpi/tuner.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index aac03118f2bff..f1bbb0dc5cfbe 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -1023,7 +1023,7 @@
%s vibrate — Priority only
- SystemUI Tuner
+ System UI tuner
Quick Settings
@@ -1033,4 +1033,9 @@
Broadcast Tile
+
+
+
+ ¯\\_(ツ)_/¯
+
diff --git a/packages/SystemUI/src/com/android/systemui/egg/ShruggyActivity.java b/packages/SystemUI/src/com/android/systemui/egg/ShruggyActivity.java
new file mode 100644
index 0000000000000..745995759be96
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/egg/ShruggyActivity.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.egg;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+import android.widget.Toast;
+import com.android.systemui.R;
+
+public class ShruggyActivity extends Activity {
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ Toast.makeText(this, getString(R.string.regrettable_lack_of_easter_egg),
+ Toast.LENGTH_SHORT).show();
+ Log.v("SystemUI", "Hey, it's just a preview; what did you expect?");
+ finish();
+ }
+}