diff options
author | Dan Sandler <dsandler@android.com> | 2015-05-15 15:08:34 -0400 |
---|---|---|
committer | Dan Sandler <dsandler@android.com> | 2015-05-15 16:10:22 -0400 |
commit | 696f6a3c48097f082b97c9829deb5aca5823b9bf (patch) | |
tree | bc70b4f753e10c8dcc7bc990d68da8eb2df1602e | |
parent | f02fd46d34624b4549565be777deff8328bbdc05 (diff) | |
download | frameworks_base-696f6a3c48097f082b97c9829deb5aca5823b9bf.zip frameworks_base-696f6a3c48097f082b97c9829deb5aca5823b9bf.tar.gz frameworks_base-696f6a3c48097f082b97c9829deb5aca5823b9bf.tar.bz2 |
Mmm mmm mmm mmm.
Change-Id: I23b560694b9cc0eb2103ec16769b0446099d1e83
-rw-r--r-- | core/java/com/android/internal/app/PlatLogoActivity.java | 170 | ||||
-rw-r--r-- | core/res/res/drawable-nodpi/platlogo.xml | 41 | ||||
-rw-r--r-- | core/res/res/drawable-nodpi/stat_sys_adb.xml | 7 | ||||
-rw-r--r-- | packages/SystemUI/AndroidManifest.xml | 18 | ||||
-rw-r--r-- | packages/SystemUI/res/drawable-nodpi/icon.xml | 53 | ||||
-rw-r--r-- | packages/SystemUI/res/drawable-nodpi/tuner.xml | 27 | ||||
-rw-r--r-- | packages/SystemUI/res/values/strings.xml | 7 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/egg/ShruggyActivity.java | 34 |
8 files changed, 166 insertions, 191 deletions
diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java index 80bc5fe..49230c1 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()); - } - }); - } + final View im = new View(this); + im.setTranslationZ(20); + im.setScaleX(0.5f); + im.setScaleY(0.5f); + im.setAlpha(0f); + im.setOutlineProvider(new ViewOutlineProvider() { @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); + public void getOutline(View view, Outline outline) { + final int pad = (int) (8*dp); + outline.setOval(pad, pad, view.getWidth()-pad, view.getHeight()-pad); } - }; - 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); - im.setTranslationZ(20); - im.setScaleX(0); - im.setScaleY(0); + }); 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(); - - 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 + 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 + 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 65cb046..f5d945a 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="560.0dp" - android:height="560.0dp" - android:viewportWidth="560.0" - android:viewportHeight="560.0"> + android:width="480dp" + android:height="480dp" + android:viewportWidth="48.0" + android:viewportHeight="48.0"> <path - android:pathData="M264.079987,240.736l0.0,9.82c7.31,-7.15 17.139999,-11.56 28.07,-11.56c22.639999,0.0 40.799999,18.48 40.799999,41.12c0.0,22.48 -18.16,40.880 -40.799999,40.880c-10.93,0.0 -20.280,-4.09 -27.59,-10.93L264.559998,339.0l-11.32,0.0l0.0,-98.269997L264.079987,240.731zM265.809998,264.869995c-0.47,0.79 -1.26,2.04 -1.26,4.79l0.0,21.07c0.0,1.97 0.47,3.07 1.1,4.17c5.19,8.88 14.78,14.94 25.63,14.94c16.43,0.0 29.950,-13.44 29.950,-29.870c0.0,-16.280 -13.52,-29.799999 -29.950,-29.799999C280.51,250.169998 271.0,256.059998 265.809998,264.869995z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M445.731,240.736l0.0,9.82c7.31,-7.15 17.139999,-11.56 28.07,-11.56c22.639999,0.0 40.799999,18.48 40.799999,41.12c0.0,22.48 -18.16,40.880 -40.799999,40.880c-10.93,0.0 -20.280,-4.09 -27.59,-10.93L446.210052,339.0l-11.32,0.0l0.0,-98.269997L445.731,240.731zM447.459991,264.869995c-0.47,0.79 -1.26,2.04 -1.26,4.79l0.0,21.07c0.0,1.97 0.47,3.07 1.1,4.17c5.19,8.88 14.78,14.94 25.63,14.94c16.43,0.0 29.950,-13.44 29.950,-29.870c0.0,-16.280 -13.52,-29.799999 -29.950,-29.799999C462.160004,250.169998 452.649994,256.059998 447.459991,264.869995z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M169.490005,279.880005c0.0,22.639999 -18.32,41.12 -40.810,41.12c-22.639999,0.0 -41.040,-18.48 -41.040,-41.12c0.0,-22.48 18.389999,-40.880 41.040,-40.880C151.169998,239.0 169.490005,257.399994 169.490005,279.880005zM158.089996,280.040009c0.0,-16.43 -13.13,-29.870 -29.41,-29.870c-16.51,0.0 -29.4,13.44 -29.4,29.870c0.0,16.280 12.89,29.799999 29.4,29.799999C144.960007,309.8387 158.089996,296.309998 158.089996,280.040009z" - android:fillColor="#FFFFFF"/> + 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"/> <path - android:pathData="M423.790009,279.880005c0.0,22.639999 -18.32,41.12 -40.810,41.12c-22.639999,0.0 -41.040,-18.48 -41.040,-41.12c0.0,-22.48 18.389999,-40.880 41.040,-40.880C405.470,239.0 423.790009,257.399994 423.790009,279.880005zM412.395,280.040009c0.0,-16.43 -13.13,-29.870 -29.41,-29.870c-16.51,0.0 -29.4,13.44 -29.4,29.870c0.0,16.280 12.89,29.799999 29.4,29.799999C399.26,309.8387 412.395,296.309998 412.395,280.040009z" - android:fillColor="#FFFFFF"/> + 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"/> <path - android:pathData="M229.02,221.0l11.17,0.0l0.0,11.48l-11.17,0.0z" - android:fillColor="#FFFFFF"/> + 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"/> <path - android:pathData="M229.02,240.65l11.17,0.0l0.0,78.62l-11.17,0.0z" + android:pathData="M24.0,24.0c0.0,0.0 0.0,2.2 0.0,5.0s0.0,5.0 0.0,5.0l10.0,-10.0L34.0,14.0L24.0,24.0z" android:fillColor="#FFFFFF"/> <path - android:pathData="M65.4,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z" - android:fillColor="#FFFFFF"/> + 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"/> <path - android:pathData="M180.58,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z" - android:fillColor="#FFFFFF"/> + android:pathData="M14.0,34.0l10.0,0.0 -10.0,-10.0z" + android:fillColor="#DDDDDD"/> <path - android:pathData="M204.8,221.0l11.17,0.0l0.0,98.27l-11.17,0.0z" - android:fillColor="#FFFFFF"/> + android:pathData="M34.0,34.0l0.0,-10.0 -10.0,10.0z" + android:fillColor="#DDDDDD"/> </vector> diff --git a/core/res/res/drawable-nodpi/stat_sys_adb.xml b/core/res/res/drawable-nodpi/stat_sys_adb.xml index d89d1f9..8f5109d 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"> <path - android:pathData="M19.000000,10.000000c0.000000,3.866000 -3.134000,7.000000 -7.000000,7.000000s-7.000000,-3.134000 -7.000000,-7.000000c0.000000,-2.318000 1.131000,-4.367000 2.867000,-5.641000L5.778000,2.270000l0.824000,-0.825000l2.290000,2.290000C9.830000,3.269000 10.882000,3.000000 12.000000,3.000000c1.118000,0.000000 2.170000,0.269000 3.107000,0.734000l2.290000,-2.290000l0.824000,0.825000l-2.089000,2.090000C17.868000,5.633000 19.000000,7.682000 19.000000,10.000000zM10.000000,8.000000c0.000000,-0.552000 -0.447000,-1.000000 -1.000000,-1.000000S8.000000,7.448000 8.000000,8.000000s0.447000,1.000000 1.000000,1.000000S10.000000,8.552000 10.000000,8.000000zM16.000000,8.000000c0.000000,-0.552000 -0.447000,-1.000000 -1.000000,-1.000000s-1.000000,0.448000 -1.000000,1.000000s0.447000,1.000000 1.000000,1.000000S16.000000,8.552000 16.000000,8.000000z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M11,18l2,0l0,5l-2,0z" - android:fillColor="#FFFFFF"/> + 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"/> </vector> diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 9d6d937..e47c7a0 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -184,16 +184,17 @@ <activity android:name=".tuner.TunerActivity" android:enabled="false" - android:icon="@*android:drawable/stat_sys_adb" + android:icon="@drawable/tuner" android:theme="@android:style/Theme.Material.Settings" android:label="@string/system_ui_tuner" + android:process=":tuner" android:exported="true"> <intent-filter> <action android:name="com.android.settings.action.EXTRA_SETTINGS" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> <meta-data android:name="com.android.settings.category" - android:value="com.android.settings.category.device" /> + android:value="com.android.settings.category.system" /> </activity> <!-- Alternate Recents --> @@ -319,6 +320,19 @@ <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity> + + <activity android:name=".egg.ShruggyActivity" + android:theme="@android:style/Theme.NoDisplay" + android:exported="true" + android:launchMode="singleInstance" + android:screenOrientation="locked" + android:process=":sweetsweetdesserts" + android:excludeFromRecents="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN"/> + <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.android.internal.category.PLATLOGO" /> </intent-filter> </activity> diff --git a/packages/SystemUI/res/drawable-nodpi/icon.xml b/packages/SystemUI/res/drawable-nodpi/icon.xml index dc1e633..7b8975a 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. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="48dp" - android:height="48dp" - android:viewportWidth="560.0" - android:viewportHeight="560.0"> + android:width="48.0dp" + android:height="48.0dp" + android:viewportWidth="48.0" + android:viewportHeight="48.0"> <path - android:pathData="M280.000000,288.000000m-260.000000,0.000000a260.000000,260.000000 0.000000,1.000000 1.000000,520.000000 0.000000a260.000000,260.000000 0.000000,1.000000 1.000000,-520.000000 0.000000" - android:fillColor="#14000000"/> + 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"/> <path - android:pathData="M280.000000,285.000000m-255.000000,0.000000a255.000000,255.000000 0.000000,1.000000 1.000000,510.000000 0.000000a255.000000,255.000000 0.000000,1.000000 1.000000,-510.000000 0.000000" - android:fillColor="#26000000"/> + 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"/> <path - android:pathData="M280.000000,282.000000m-252.000000,0.000000a252.000000,252.000000 0.000000,1.000000 1.000000,504.000000 0.000000a252.000000,252.000000 0.000000,1.000000 1.000000,-504.000000 0.000000" - android:fillColor="#26000000"/> + 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"/> <path - android:pathData="M280.000000,280.000000m-250.000000,0.000000a250.000000,250.000000 0.000000,1.000000 1.000000,500.000000 0.000000a250.000000,250.000000 0.000000,1.000000 1.000000,-500.000000 0.000000" - android:fillColor="#9C27B0"/> - <path - android:pathData="M265.786011,244.938004l0.000000,8.768000c6.527000,-6.384000 15.303000,-10.321000 25.063000,-10.321000c20.214001,0.000000 36.429001,16.500000 36.429001,36.714001c0.000000,20.072001 -16.215000,36.500000 -36.429001,36.500000c-9.759000,0.000000 -18.107000,-3.651000 -24.634001,-9.759000l0.000000,25.839001l-10.107000,0.000000l0.000000,-87.740997L265.786011,244.937988L265.786011,244.938004zM267.330994,266.490997c-0.420000,0.706000 -1.125000,1.821000 -1.125000,4.277000l0.000000,18.813000c0.000000,1.759000 0.420000,2.740000 0.982000,3.723000c4.634000,7.929000 13.197000,13.339000 22.882999,13.339000c14.671000,0.000000 26.742001,-11.999000 26.742001,-26.669001c0.000000,-14.536000 -12.071000,-26.607000 -26.742001,-26.607000C280.454987,253.365997 271.963989,258.625000 267.330994,266.490997z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M427.973999,244.938004l0.000000,8.768000c6.526000,-6.384000 15.304000,-10.321000 25.062000,-10.321000c20.215000,0.000000 36.429001,16.500000 36.429001,36.714001c0.000000,20.072001 -16.214001,36.500000 -36.429001,36.500000c-9.758000,0.000000 -18.106001,-3.651000 -24.634001,-9.759000l0.000000,25.839001l-10.107000,0.000000l0.000000,-87.740997L427.973999,244.937988L427.973999,244.938004zM429.518005,266.490997c-0.419000,0.706000 -1.125000,1.821000 -1.125000,4.277000l0.000000,18.813000c0.000000,1.759000 0.420000,2.740000 0.982000,3.723000c4.634000,7.929000 13.196000,13.339000 22.884001,13.339000c14.670000,0.000000 26.740999,-11.999000 26.740999,-26.669001c0.000000,-14.536000 -12.071000,-26.607000 -26.740999,-26.607000C442.643005,253.365997 434.152008,258.625000 429.518005,266.490997z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M181.330994,279.893005c0.000000,20.214001 -16.357000,36.715000 -36.438000,36.715000c-20.214001,0.000000 -36.643002,-16.500999 -36.643002,-36.715000c0.000000,-20.070999 16.419001,-36.500000 36.643002,-36.500000C164.973007,243.393005 181.330994,259.821014 181.330994,279.893005zM171.151993,280.036011c0.000000,-14.669000 -11.723000,-26.669001 -26.259001,-26.669001c-14.741000,0.000000 -26.250000,12.000000 -26.250000,26.669001c0.000000,14.536000 11.509000,26.607000 26.250000,26.607000C159.429001,306.634003 171.151993,294.562012 171.151993,280.036011z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M408.384003,279.893005c0.000000,20.214001 -16.357000,36.715000 -36.437000,36.715000c-20.215000,0.000000 -36.644001,-16.500999 -36.644001,-36.715000c0.000000,-20.070999 16.420000,-36.500000 36.644001,-36.500000C392.026001,243.393005 408.384003,259.821014 408.384003,279.893005zM398.204987,280.036011c0.000000,-14.669000 -11.723000,-26.669001 -26.257999,-26.669001c-14.742000,0.000000 -26.250999,12.000000 -26.250999,26.669001c0.000000,14.536000 11.509000,26.607000 26.250999,26.607000C386.481995,306.634003 398.204987,294.562012 398.204987,280.036011z" + android:pathData="M24.0,24.0c0.0,0.0 0.0,2.2 0.0,5.0s0.0,5.0 0.0,5.0l10.0,-10.0L34.0,14.0L24.0,24.0z" android:fillColor="#FFFFFF"/> <path - android:pathData="M234.481995,227.320999l9.973000,0.000000l0.000000,10.250000l-9.973000,0.000000z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M234.481995,244.865997l9.973000,0.000000l0.000000,70.195999l-9.973000,0.000000z" - android:fillColor="#FFFFFF"/> + 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"/> <path - android:pathData="M88.392998,227.320999l9.973000,0.000000l0.000000,87.740997l-9.973000,0.000000z" - android:fillColor="#FFFFFF"/> + android:pathData="M14.0,34.0l10.0,0.0 -10.0,-10.0z" + android:fillColor="#DDDDDD"/> <path - android:pathData="M191.231995,227.320999l9.973000,0.000000l0.000000,87.740997l-9.973000,0.000000z" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M212.856995,227.320999l9.974000,0.000000l0.000000,87.740997l-9.974000,0.000000z" - android:fillColor="#FFFFFF"/> + android:pathData="M34.0,34.0l0.0,-10.0 -10.0,10.0z" + android:fillColor="#DDDDDD"/> </vector> diff --git a/packages/SystemUI/res/drawable-nodpi/tuner.xml b/packages/SystemUI/res/drawable-nodpi/tuner.xml new file mode 100644 index 0000000..e27423f --- /dev/null +++ b/packages/SystemUI/res/drawable-nodpi/tuner.xml @@ -0,0 +1,27 @@ +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48.0dp" + android:height="48.0dp" + android:viewportWidth="48.0" + android:viewportHeight="48.0"> + <path + android:fillColor="#FF000000" + android:pathData="M29.9,24.8c0.0,-0.3 0.1,-0.5 0.1,-0.8s0.0,-0.5 -0.1,-0.8l1.7,-1.3c0.2,-0.1 0.2,-0.3 0.1,-0.5l-1.6,-2.8c-0.1,-0.2 -0.3,-0.2 -0.5,-0.2l-2.0,0.8c-0.4,-0.3 -0.9,-0.6 -1.4,-0.8L26.0,16.3c0.0,-0.2 -0.2,-0.3 -0.4,-0.3l-3.2,0.0c-0.2,0.0 -0.4,0.1 -0.4,0.3l-0.3,2.1c-0.5,0.2 -0.9,0.5 -1.4,0.8l-2.0,-0.8c-0.2,-0.1 -0.4,0.0 -0.5,0.2l-1.6,2.8c-0.1,0.2 -0.1,0.4 0.1,0.5l1.7,1.3c0.0,0.3 -0.1,0.5 -0.1,0.8s0.0,0.5 0.1,0.8l-1.7,1.3c-0.2,0.1 -0.2,0.3 -0.1,0.5l1.6,2.8c0.1,0.2 0.3,0.2 0.5,0.2l2.0,-0.8c0.4,0.3 0.9,0.6 1.4,0.8l0.3,2.1c0.0,0.2 0.2,0.3 0.4,0.3l3.2,0.0c0.2,0.0 0.4,-0.1 0.4,-0.3l0.3,-2.1c0.5,-0.2 0.9,-0.5 1.4,-0.8l2.0,0.8c0.2,0.1 0.4,0.0 0.5,-0.2l1.6,-2.8c0.1,-0.2 0.1,-0.4 -0.1,-0.5L29.9,24.8zM24.0,26.8c-1.5,0.0 -2.8,-1.3 -2.8,-2.8s1.3,-2.8 2.8,-2.8s2.8,1.3 2.8,2.8S25.5,26.8 24.0,26.8z"/> + <path + android:fillColor="#FF000000" + android:pathData="M18.0,38.0c-0.6,0.0 -1.0,-0.4 -1.0,-1.0s0.4,-1.0 1.0,-1.0s1.0,0.4 1.0,1.0S18.6,38.0 18.0,38.0zM24.0,38.0c-0.6,0.0 -1.0,-0.4 -1.0,-1.0s0.4,-1.0 1.0,-1.0s1.0,0.4 1.0,1.0S24.6,38.0 24.0,38.0zM30.0,38.0c-0.6,0.0 -1.0,-0.4 -1.0,-1.0s0.4,-1.0 1.0,-1.0s1.0,0.4 1.0,1.0S30.6,38.0 30.0,38.0zM42.0,6.0L6.0,6.0c-2.2,0.0 -4.0,1.8 -4.0,4.0l0.0,28.0c0.0,2.2 1.8,4.0 4.0,4.0l36.0,0.0c2.2,0.0 4.0,-1.8 4.0,-4.0L46.0,10.0C46.0,7.8 44.2,6.0 42.0,6.0zM42.0,34.0L6.0,34.0L6.0,14.0l36.0,0.0L42.0,34.0zM9.0,12.0L7.0,12.0l0.0,-2.0l2.0,0.0L9.0,12.0zM13.0,12.0l-2.0,0.0l0.0,-2.0l2.0,0.0L13.0,12.0zM17.0,12.0l-2.0,0.0l0.0,-2.0l2.0,0.0L17.0,12.0z"/> +</vector> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index aac0311..f1bbb0d 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1023,7 +1023,7 @@ <string name="volume_stream_vibrate_dnd" translatable="false">%s vibrate — Priority only</string> <!-- Name of special SystemUI debug settings --> - <string name="system_ui_tuner">SystemUI Tuner</string> + <string name="system_ui_tuner">System UI tuner</string> <!-- Name of quick settings --> <string name="quick_settings">Quick Settings</string> @@ -1033,4 +1033,9 @@ <!-- Name of a quick settings tile controlled by broadcast --> <string name="broadcast_tile">Broadcast Tile</string> + + <!-- For preview release. DO NOT TRANSLATE --> + <string name="regrettable_lack_of_easter_egg"> + ¯\\_(ツ)_/¯ + </string> </resources> 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 0000000..7459957 --- /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(); + } +} |