Loading core/java/com/android/internal/app/PlatLogoActivity.java +45 −125 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -87,86 +65,27 @@ 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() { 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 getOutline(View view, Outline outline) { outline.setRect(0, getHeight() / 2, getWidth(), getHeight()); final int pad = (int) (8*dp); outline.setOval(pad, pad, view.getWidth()-pad, view.getHeight()-pad); } }); } @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); 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) { Loading @@ -176,9 +95,13 @@ public class PlatLogoActivity extends Activity { 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 Loading @@ -198,9 +121,6 @@ public class PlatLogoActivity extends Activity { return true; } }); } else { im.setBackground(makeRipple()); } mTapCount++; } }); Loading Loading @@ -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) Loading core/res/res/drawable-nodpi/platlogo.xml +18 −23 Original line number Diff line number Diff line Loading @@ -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> core/res/res/drawable-nodpi/stat_sys_adb.xml +2 −5 Original line number Diff line number Diff line Loading @@ -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> packages/SystemUI/AndroidManifest.xml +16 −2 Original line number Diff line number Diff line Loading @@ -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 --> Loading Loading @@ -316,6 +317,19 @@ 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" /> </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" /> Loading packages/SystemUI/res/drawable-nodpi/icon.xml +18 −35 Original line number Diff line number Diff line Loading @@ -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> Loading
core/java/com/android/internal/app/PlatLogoActivity.java +45 −125 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -87,86 +65,27 @@ 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() { 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 getOutline(View view, Outline outline) { outline.setRect(0, getHeight() / 2, getWidth(), getHeight()); final int pad = (int) (8*dp); outline.setOval(pad, pad, view.getWidth()-pad, view.getHeight()-pad); } }); } @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); 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) { Loading @@ -176,9 +95,13 @@ public class PlatLogoActivity extends Activity { 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 Loading @@ -198,9 +121,6 @@ public class PlatLogoActivity extends Activity { return true; } }); } else { im.setBackground(makeRipple()); } mTapCount++; } }); Loading Loading @@ -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) Loading
core/res/res/drawable-nodpi/platlogo.xml +18 −23 Original line number Diff line number Diff line Loading @@ -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>
core/res/res/drawable-nodpi/stat_sys_adb.xml +2 −5 Original line number Diff line number Diff line Loading @@ -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>
packages/SystemUI/AndroidManifest.xml +16 −2 Original line number Diff line number Diff line Loading @@ -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 --> Loading Loading @@ -316,6 +317,19 @@ 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" /> </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" /> Loading
packages/SystemUI/res/drawable-nodpi/icon.xml +18 −35 Original line number Diff line number Diff line Loading @@ -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>