Loading core/java/com/android/internal/app/PlatLogoActivity.java +182 −125 Original line number Diff line number Diff line /* * Copyright (C) 2010 The Android Open Source Project * Copyright (C) 2018 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. Loading @@ -16,157 +16,214 @@ package com.android.internal.app; import android.animation.Animator; import android.animation.ObjectAnimator; import android.annotation.Nullable; import android.animation.TimeAnimator; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.ContentResolver; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Outline; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PixelFormat; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.RippleDrawable; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.os.Bundle; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; import android.util.MathUtils; import android.view.Gravity; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.MotionEvent.PointerCoords; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.animation.PathInterpolator; import android.widget.FrameLayout; import android.widget.ImageView; public class PlatLogoActivity extends Activity { public static final boolean FINISH = true; FrameLayout layout; TimeAnimator anim; PBackground bg; FrameLayout mLayout; int mTapCount; int mKeyCount; PathInterpolator mInterpolator = new PathInterpolator(0f, 0f, 0.5f, 1f); private class PBackground extends Drawable { private float maxRadius, radius, x, y, dp; private int[] palette; private int darkest; private float offset; public PBackground() { randomizePalette(); } /** * set inner radius of "p" logo */ public void setRadius(float r) { this.radius = Math.max(48*dp, r); } /** * move the "p" */ public void setPosition(float x, float y) { this.x = x; this.y = y; } /** * for animating the "p" */ public void setOffset(float o) { this.offset = o; } /** * rough luminance calculation * https://www.w3.org/TR/AERT/#color-contrast */ public float lum(int rgb) { return ((Color.red(rgb) * 299f) + (Color.green(rgb) * 587f) + (Color.blue(rgb) * 114f)) / 1000f; } /** * create a random evenly-spaced color palette * guaranteed to contrast! */ public void randomizePalette() { final int slots = 2 + (int)(Math.random() * 2); float[] color = new float[] { (float) Math.random() * 360f, 1f, 1f }; palette = new int[slots]; darkest = 0; for (int i=0; i<slots; i++) { palette[i] = Color.HSVToColor(color); color[0] += 360f/slots; if (lum(palette[i]) < lum(palette[darkest])) darkest = i; } final StringBuilder str = new StringBuilder(); for (int c : palette) { str.append(String.format("#%08x ", c)); } Log.v("PlatLogoActivity", "color palette: " + str); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); public void draw(Canvas canvas) { if (dp == 0) dp = getResources().getDisplayMetrics().density; final float width = canvas.getWidth(); final float height = canvas.getHeight(); if (radius == 0) { setPosition(width / 2, height / 2); setRadius(width / 6); } final float inner_w = radius * 0.667f; final Paint paint = new Paint(); paint.setStrokeCap(Paint.Cap.BUTT); canvas.translate(x, y); Path p = new Path(); p.moveTo(-radius, height); p.lineTo(-radius, 0); p.arcTo(-radius, -radius, radius, radius, -180, 270, false); p.lineTo(-radius, radius); float w = Math.max(canvas.getWidth(), canvas.getHeight()) * 1.414f; paint.setStyle(Paint.Style.FILL); int i=0; while (w > radius*2 + inner_w*2) { paint.setColor(0xFF000000 | palette[i % palette.length]); // for a slower but more complete version: // paint.setStrokeWidth(w); // canvas.drawPath(p, paint); canvas.drawOval(-w/2, -w/2, w/2, w/2, paint); w -= inner_w * (1.1f + Math.sin((i/20f + offset) * 3.14159f)); i++; } // the innermost circle needs to be a constant color to avoid rapid flashing paint.setColor(0xFF000000 | palette[(darkest+1) % palette.length]); canvas.drawOval(-radius, -radius, radius, radius, paint); mLayout = new FrameLayout(this); setContentView(mLayout); p.reset(); p.moveTo(-radius, height); p.lineTo(-radius, 0); p.arcTo(-radius, -radius, radius, radius, -180, 270, false); p.lineTo(-radius + inner_w, radius); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(inner_w*2); paint.setColor(palette[darkest]); canvas.drawPath(p, paint); paint.setStrokeWidth(inner_w); paint.setColor(0xFFFFFFFF); canvas.drawPath(p, paint); } @Override public void onAttachedToWindow() { final DisplayMetrics dm = getResources().getDisplayMetrics(); final float dp = dm.density; final int size = (int) (Math.min(Math.min(dm.widthPixels, dm.heightPixels), 600*dp) - 100*dp); final ImageView im = new ImageView(this); final int pad = (int)(40*dp); im.setPadding(pad, pad, pad, pad); im.setTranslationZ(20); im.setScaleX(0.5f); im.setScaleY(0.5f); im.setAlpha(0f); im.setBackground(new RippleDrawable( ColorStateList.valueOf(0xFF776677), getDrawable(com.android.internal.R.drawable.platlogo), null)); im.setOutlineProvider(new ViewOutlineProvider() { public void setAlpha(int alpha) { } @Override public void getOutline(View view, Outline outline) { final int w = view.getWidth(); final int h = view.getHeight(); outline.setOval((int)(w*.125), (int)(h*.125), (int)(w*.96), (int)(h*.96)); public void setColorFilter(ColorFilter colorFilter) { } }); im.setElevation(12f*dp); im.setClickable(true); im.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { im.setOnLongClickListener(new View.OnLongClickListener() { public int getOpacity() { return 0; } } @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() { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); layout = new FrameLayout(this); setContentView(layout); bg = new PBackground(); layout.setBackground(bg); layout.setOnTouchListener(new View.OnTouchListener() { final PointerCoords pc0 = new PointerCoords(); final PointerCoords pc1 = new PointerCoords(); @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."); } if (FINISH) finish(); public boolean onTouch(View v, MotionEvent event) { switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: if (event.getPointerCount() > 1) { event.getPointerCoords(0, pc0); event.getPointerCoords(1, pc1); bg.setRadius((float) Math.hypot(pc0.x - pc1.x, pc0.y - pc1.y) / 2f); } break; } }); return true; } }); mTapCount++; } }); // Enable hardware keyboard input for TV compatibility. im.setFocusable(true); im.requestFocus(); im.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode != KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) { ++mKeyCount; if (mKeyCount > 2) { if (mTapCount > 5) { im.performLongClick(); } else { im.performClick(); } } return true; } else { return false; } public void onStart() { super.onStart(); bg.randomizePalette(); anim = new TimeAnimator(); anim.setTimeListener( new TimeAnimator.TimeListener() { @Override public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime) { bg.setOffset((float) totalTime / 60000f); bg.invalidateSelf(); } }); mLayout.addView(im, new FrameLayout.LayoutParams(size, size, Gravity.CENTER)); anim.start(); } im.animate().scaleX(1f).scaleY(1f).alpha(1f) .setInterpolator(mInterpolator) .setDuration(500) .setStartDelay(800) .start(); @Override public void onStop() { if (anim != null) { anim.cancel(); anim = null; } super.onStop(); } } core/res/res/drawable-nodpi/platlogo.xml +18 −34 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2017 The Android Open Source Project Copyright (C) 2018 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. Loading @@ -14,36 +13,21 @@ Copyright (C) 2017 The Android Open Source Project 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="48dp" android:height="48dp" android:viewportWidth="48" android:viewportHeight="48"> <group> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:name="vector" android:width="640dp" android:height="640dp" android:viewportWidth="64" android:viewportHeight="64"> <path android:fillColor="#2C292A" android:fillType="evenOdd" android:pathData="M6,26a20,20 0 0,1 40,0a20,20 0 0,1 -40,0z"/> android:name="bg" android:pathData="M 27 43 L 32 43 C 38.075 43 43 38.075 43 32 C 43 25.925 38.075 21 32 21 C 25.925 21 21 25.925 21 32 L 21 64" android:strokeColor="#6823a1" android:strokeWidth="16"/> <path android:fillColor="#FAFAFA" android:fillType="evenOdd" android:pathData="M4,24a20,20 0 0,1 40,0a20,20 0 0,1 -40,0z"/> <path android:fillColor="#2C292A" android:fillType="evenOdd" android:pathData="M2,22a20,20 0 0,1 40,0a20,20 0 0,1 -40,0z"/> <path android:fillColor="#00000000" android:strokeColor="#453F41" android:strokeWidth="1" android:fillType="evenOdd" android:pathData="M26.5 29.5v3c0 1.13-.87 2-2 2s-2-.87-2-2v-3h-1v3c0 1.13-.87 2-2 2s-2-.87-2-2v-3H17a1.5 1.5 0 0 1-1.5-1.5V17.5h13V28a1.5 1.5 0 0 1-1.5 1.5h-.5zM13.5 17.5c1.13 0 2 .87 2 2v7c0 1.13-.87 2-2 2s-2-.87-2-2v-7c0-1.13.87-2 2-2zM30.5 17.5c1.13 0 2 .87 2 2v7c0 1.13-.87 2-2 2s-2-.87-2-2v-7c0-1.13.87-2 2-2zM26.3 12.11A6.46 6.46 0 0 1 28.5 17v.5h-13V17a6.46 6.46 0 0 1 2.2-4.89l-.9-.9a.98.98 0 0 1 0-1.41.98.98 0 0 1 1.4 0l1.26 1.25A6.33 6.33 0 0 1 22 10.5c.87 0 1.73.2 2.54.55L25.8 9.8a.98.98 0 0 1 1.4 0 .98.98 0 0 1 0 1.4l-.9.91z"/> <path android:fillColor="#453F41" android:fillType="evenOdd" android:pathData="M20.16 14.5a.66.66 0 1 1-1.31 0c0-.36.29-.65.65-.65.36 0 .65.29.65.65zM25.16 14.5c0 .36-.3.66-.66.66a.65.65 0 1 1 .66-.66z"/> <path android:fillColor="#453F41" android:pathData="M22 40.5c0.36 0 0.73-0.01 1.09-0.03l-0.18-3A15.77 15.77 0 0 1 22 37.5v3zm2.17-0.13a18.48 18.48 0 0 0 1.08-0.15l-0.53-2.96c-0.3 0.05-0.6 0.1-0.9 0.13l0.35 2.98zM26.32 40a18.37 18.37 0 0 0 1.05-0.28l-0.87-2.87a15.37 15.37 0 0 1-0.88 0.23l0.7 2.92zm2.1-0.64l-1.03-2.81a15.39 15.39 0 0 0 0.84-0.34l1.2 2.74a18.39 18.39 0 0 1-1 0.41zm1.99-0.87l-1.37-2.67a15.46 15.46 0 0 0 0.8-0.44l1.52 2.59a18.46 18.46 0 0 1-0.95 0.52zm1.89-1.11l-1.67-2.5a15.55 15.55 0 0 0 0.74-0.52l1.81 2.39a18.55 18.55 0 0 1-0.88 0.63zm1.75-1.33l-1.95-2.28a15.6 15.6 0 0 0 0.67-0.61l2.09 2.15a18.6 18.6 0 0 1-0.8 0.74zm1.6-1.55l-2.22-2.02a15.6 15.6 0 0 0 0.6-0.7l2.33 1.9a18.6 18.6 0 0 1-0.72 0.82zM37 32.82l-2.43-1.76a15.53 15.53 0 0 0 0.5-0.75l2.54 1.6c-0.2 0.31-0.4 0.61-0.61 0.9zm1.15-1.8l-2.62-1.47a15.45 15.45 0 0 0 0.42-0.8l2.7 1.3a18.45 18.45 0 0 1-0.5 0.97zm0.95-1.98l-2.77-1.14a15.38 15.38 0 0 0 0.32-0.86l2.84 0.98a18.38 18.38 0 0 1-0.39 1.02zm0.72-2.09c0.1-0.34 0.18-0.7 0.26-1.05l-2.93-0.63a15.38 15.38 0 0 1-0.22 0.88l2.89 0.8zm0.46-2.15a18.52 18.52 0 0 0 0.13-1.08l-2.99-0.28a15.52 15.52 0 0 1-0.1 0.9l2.96 0.46zm0.2-2.2a18.81 18.81 0 0 0 0-1.1l-3 0.08a16 16 0 0 1 0 0.92l3 0.1zm-0.06-2.2a18.54 18.54 0 0 0-0.12-1.07l-2.97 0.43c0.04 0.3 0.08 0.6 0.1 0.9l3-0.25zm-0.31-2.15a18.39 18.39 0 0 0-0.25-1.06l-2.9 0.78a15.39 15.39 0 0 1 0.21 0.89l2.94-0.6zm-0.57-2.12l-2.85 0.95a15.37 15.37 0 0 0-0.31-0.85l2.78-1.12a18.37 18.37 0 0 1 0.38 1.02zm-0.83-2.06l-2.71 1.29a15.44 15.44 0 0 0-0.42-0.81l2.63-1.45a18.44 18.44 0 0 1 0.5 0.97zm-1.03-1.88l-2.54 1.6a15.53 15.53 0 0 0-0.5-0.76l2.44-1.74 0.6 0.9zm-1.28-1.79l-2.33 1.88a15.6 15.6 0 0 0-0.6-0.69l2.23-2.02a18.6 18.6 0 0 1 0.7 0.83zm-1.48-1.63l-2.1 2.14a15.6 15.6 0 0 0-0.67-0.62l1.97-2.26a18.6 18.6 0 0 1 0.8 0.74zM33.24 7.3l-1.82 2.38a15.55 15.55 0 0 0-0.74-0.53l1.68-2.49c0.3 0.2 0.6 0.42 0.88 0.64zm-1.71-1.17L29.98 8.7a15.47 15.47 0 0 0-0.8-0.45l1.4-2.66a18.47 18.47 0 0 1 0.95 0.54zm-1.95-1.02l-1.23 2.74A15.4 15.4 0 0 0 27.5 7.5l1.06-2.8a18.4 18.4 0 0 1 1.01 0.4zm-2.06-0.78l-0.9 2.86a15.37 15.37 0 0 0-0.87-0.24l0.72-2.92a18.37 18.37 0 0 1 1.05 0.3zM25.38 3.8a18.47 18.47 0 0 0-1.08-0.17l-0.37 2.98c0.3 0.04 0.6 0.08 0.9 0.14l0.55-2.95zm-2.2-0.27A18.75 18.75 0 0 0 22.1 3.5l-0.02 3L23 6.53l0.19-3zM21 3.53a18.6 18.6 0 0 0-1.08 0.09l0.33 2.98a15.6 15.6 0 0 1 0.91-0.08l-0.16-3zm-2.16 0.24A18.4 18.4 0 0 0 17.76 4l0.68 2.92a15.4 15.4 0 0 1 0.9-0.18l-0.51-2.96zm-2.14 0.5l0.86 2.88a15.37 15.37 0 0 0-0.86 0.28l-1.03-2.81a18.37 18.37 0 0 1 1.03-0.35zm-2.07 0.76l1.2 2.75a15.42 15.42 0 0 0-0.83 0.4L13.63 5.5a18.42 18.42 0 0 1 0.99-0.47zM12.7 6l1.5 2.6a15.5 15.5 0 0 0-0.76 0.48l-1.66-2.5A18.5 18.5 0 0 1 12.7 6zm-1.83 1.22l1.8 2.4a15.58 15.58 0 0 0-0.7 0.57L10.01 7.9a18.58 18.58 0 0 1 0.85-0.68zM9.19 8.66l2.07 2.16a15.6 15.6 0 0 0-0.63 0.65l-2.2-2.04a18.6 18.6 0 0 1 0.76-0.77zm-1.51 1.63l2.32 1.9a15.57 15.57 0 0 0-0.56 0.72l-2.42-1.76a18.57 18.57 0 0 1 0.66-0.86zm-1.23 1.69l2.52 1.62a15.5 15.5 0 0 0-0.47 0.78l-2.61-1.47a18.5 18.5 0 0 1 0.56-0.93zm-1.08 1.9l2.7 1.32a15.41 15.41 0 0 0-0.38 0.83l-2.77-1.15a18.41 18.41 0 0 1 0.45-1zm-0.85 2.04l2.84 0.98a15.37 15.37 0 0 0-0.28 0.87L4.2 16.96c0.1-0.35 0.2-0.7 0.32-1.04zm-0.6 2.12a18.43 18.43 0 0 0-0.2 1.07l2.97 0.47c0.05-0.3 0.1-0.6 0.17-0.9l-2.93-0.64zm-0.34 2.18a18.65 18.65 0 0 0-0.07 1.09l3 0.11 0.06-0.91-2.99-0.29zm-0.08 2.2a18.7 18.7 0 0 0 0.06 1.1l3-0.25a15.7 15.7 0 0 1-0.06-0.91l-3 0.07zm0.18 2.18a18.44 18.44 0 0 0 0.18 1.07l2.95-0.6a15.44 15.44 0 0 1-0.16-0.9L3.68 24.6zm0.43 2.14l2.9-0.77a15.37 15.37 0 0 0 0.26 0.88l-2.85 0.94a18.37 18.37 0 0 1-0.3-1.05zm0.7 2.1l2.78-1.11a15.4 15.4 0 0 0 0.36 0.83l-2.71 1.27a18.4 18.4 0 0 1-0.44-1zm0.9 1.95l2.65-1.43a15.48 15.48 0 0 0 0.45 0.8l-2.55 1.57a18.48 18.48 0 0 1-0.54-0.94zm1.17 1.87l2.45-1.73a15.56 15.56 0 0 0 0.54 0.73l-2.34 1.87a18.56 18.56 0 0 1-0.65-0.87zm1.37 1.72l2.23-2a15.6 15.6 0 0 0 0.63 0.65l-2.1 2.14a18.6 18.6 0 0 1-0.76-0.79zm1.58 1.56l1.98-2.26c0.22 0.2 0.46 0.39 0.7 0.58l-1.84 2.37a18.59 18.59 0 0 1-0.84-0.7zm1.66 1.28l1.7-2.46a15.52 15.52 0 0 0 0.77 0.5l-1.56 2.56a18.52 18.52 0 0 1-0.91-0.6zm1.87 1.14l1.4-2.65a15.43 15.43 0 0 0 0.82 0.4l-1.24 2.73a18.43 18.43 0 0 1-0.98-0.48zm2 0.91l1.08-2.8a15.37 15.37 0 0 0 0.86 0.3l-0.9 2.86a18.37 18.37 0 0 1-1.04-0.36zm2.1 0.67a18.4 18.4 0 0 0 1.07 0.23l0.56-2.94a15.4 15.4 0 0 1-0.9-0.2l-0.72 2.91zm2.18 0.41a18.57 18.57 0 0 0 1.08 0.1l0.2-2.99a15.57 15.57 0 0 1-0.9-0.09l-0.38 2.98zm2.2 0.15H22v-3h-0.13l-0.03 3z"/> </group> android:name="fg" android:pathData="M 29 43 L 32 43 C 38.075 43 43 38.075 43 32 C 43 25.925 38.075 21 32 21 C 25.925 21 21 25.925 21 32 L 21 64" android:strokeColor="#ff0000" android:strokeWidth="8"/> </vector> core/res/res/drawable-nodpi/platlogo_m.xml +0 −19 Original line number Diff line number Diff line Loading @@ -18,23 +18,4 @@ Copyright (C) 2017 The Android Open Source Project android:height="480dp" android:viewportWidth="48.0" android:viewportHeight="48.0"> <!--<path android:pathData="M25.0,25.0m-20.5,0.0a20.5,20.5,0,1,1,41.0,0.0a20.5,20.5,0,1,1,-41.0,0.0" android:fillAlpha="0.066" android:fillColor="#000000"/>--> <path android:pathData="M24.0,24.0m-20.0,0.0a20.0,20.0,0,1,1,40.0,0.0a20.0,20.0,0,1,1,-40.0,0.0" android:fillColor="#FFC107"/> <path android:pathData="M44,24.2010101 L33.9004889,14.101499 L14.101499,33.9004889 L24.2010101,44 C29.2525804,43.9497929 34.2887564,41.9975027 38.1431296,38.1431296 C41.9975027,34.2887564 43.9497929,29.2525804 44,24.2010101 Z" android:fillColor="#FE9F00"/> <path android:pathData="M24.0,24.0m-14.0,0.0a14.0,14.0,0,1,1,28.0,0.0a14.0,14.0,0,1,1,-28.0,0.0" android:fillColor="#FED44F"/> <path android:pathData="M37.7829445,26.469236 L29.6578482,18.3441397 L18.3441397,29.6578482 L26.469236,37.7829445 C29.1911841,37.2979273 31.7972024,36.0037754 33.9004889,33.9004889 C36.0037754,31.7972024 37.2979273,29.1911841 37.7829445,26.469236 Z" android:fillColor="#FFC107"/> <path android:pathData="M24.0,24.0m-8.0,0.0a8.0,8.0,0,1,1,16.0,0.0a8.0,8.0,0,1,1,-16.0,0.0" android:fillColor="#FFFFFF"/> </vector> core/res/res/drawable-nodpi/stat_sys_adb.xml +19 −20 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2017 The Android Open Source Project Copyright (C) 2018 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. Loading @@ -14,24 +13,24 @@ Copyright (C) 2017 The Android Open Source Project 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <group> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:name="vector" android:width="48dp" android:height="48dp" android:viewportWidth="48" android:viewportHeight="48"> <group android:name="stat_sys_adb"> <path android:fillColor="#FFFFFF" android:fillAlpha=".33" android:fillType="evenOdd" android:pathData="M5.71 18.29A8.99 8.99 0 0 0 22 13c0-3-1.46-5.65-3.71-7.29A8.99 8.99 0 0 0 2 11c0 3 1.46 5.65 3.71 7.29z"/> android:name="outer" android:pathData="M 18 30 L 24 30 C 29.523 30 34 25.523 34 20 C 34 14.477 29.523 10 24 10 C 18.477 10 14 14.477 14 20 L 14 44" android:strokeColor="#000000" android:strokeWidth="10"/> <path android:fillColor="#FFFFFF" android:fillType="evenOdd" android:pathData="M7.25 19.18A8.5 8.5 0 0 0 19.19 7.24 9 9 0 0 1 7.24 19.19z"/> <path android:fillColor="#FFFFFF" android:fillAlpha=".33" android:pathData="M10.5 3a0.5 0.5 0 1 1 1 0v2.05a0.5 0.5 0 1 1-1 0V3zm3.1 0.42a0.5 0.5 0 0 1 0.93 0.39l-0.8 1.88A0.5 0.5 0 1 1 12.8 5.3l0.8-1.88zm2.7 1.57a0.5 0.5 0 1 1 0.71 0.7l-1.45 1.46a0.5 0.5 0 0 1-0.7-0.71l1.44-1.45zm1.9 2.5a0.5 0.5 0 0 1 0.38 0.92l-1.9 0.77a0.5 0.5 0 0 1-0.37-0.93l1.9-0.77zM19 10.5a0.5 0.5 0 1 1 0 1h-2.05a0.5 0.5 0 0 1 0-1H19zm-0.42 3.1a0.5 0.5 0 0 1-0.39 0.93l-1.88-0.8a0.5 0.5 0 1 1 0.39-0.92l1.88 0.8zm-1.57 2.7a0.5 0.5 0 1 1-0.7 0.71l-1.46-1.45a0.5 0.5 0 0 1 0.71-0.7l1.45 1.44zm-2.5 1.9a0.5 0.5 0 1 1-0.92 0.38l-0.77-1.9a0.5 0.5 0 0 1 0.93-0.37l0.77 1.9zM11.5 19a0.5 0.5 0 1 1-1 0v-2.05a0.5 0.5 0 0 1 1 0V19zm-3.1-0.42a0.5 0.5 0 0 1-0.93-0.39l0.8-1.88A0.5 0.5 0 0 1 9.2 16.7l-0.8 1.88zm-2.7-1.57a0.5 0.5 0 1 1-0.71-0.7l1.45-1.46a0.5 0.5 0 0 1 0.7 0.71L5.7 17.01zm-1.9-2.48a0.5 0.5 0 0 1-0.38-0.92l1.88-0.8a0.5 0.5 0 0 1 0.4 0.92l-1.9 0.8zM3 11.5a0.5 0.5 0 1 1 0-1h2.05a0.5 0.5 0 1 1 0 1H3zm0.42-3.1A0.5 0.5 0 0 1 3.8 7.46l1.88 0.8A0.5 0.5 0 1 1 5.3 9.2L3.42 8.4zm1.57-2.7a0.5 0.5 0 1 1 0.7-0.71l1.46 1.45a0.5 0.5 0 0 1-0.71 0.7L4.99 5.7zm2.5-1.9A0.5 0.5 0 0 1 8.4 3.41l0.77 1.9a0.5 0.5 0 0 1-0.93 0.37L7.48 3.8z"/> android:name="inner" android:pathData="M 19 30 L 24 30 C 29.523 30 34 25.523 34 20 C 34 14.477 29.523 10 24 10 C 18.477 10 14 14.477 14 20 L 14 44" android:strokeColor="#000000" android:strokeAlpha="0" android:strokeWidth="6"/> </group> </vector> Loading
core/java/com/android/internal/app/PlatLogoActivity.java +182 −125 Original line number Diff line number Diff line /* * Copyright (C) 2010 The Android Open Source Project * Copyright (C) 2018 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. Loading @@ -16,157 +16,214 @@ package com.android.internal.app; import android.animation.Animator; import android.animation.ObjectAnimator; import android.annotation.Nullable; import android.animation.TimeAnimator; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.ContentResolver; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Outline; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PixelFormat; import android.graphics.PorterDuff; import android.graphics.PorterDuffColorFilter; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.RippleDrawable; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.os.Bundle; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; import android.util.MathUtils; import android.view.Gravity; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.MotionEvent.PointerCoords; import android.view.View; import android.view.ViewGroup; import android.view.ViewOutlineProvider; import android.view.animation.PathInterpolator; import android.widget.FrameLayout; import android.widget.ImageView; public class PlatLogoActivity extends Activity { public static final boolean FINISH = true; FrameLayout layout; TimeAnimator anim; PBackground bg; FrameLayout mLayout; int mTapCount; int mKeyCount; PathInterpolator mInterpolator = new PathInterpolator(0f, 0f, 0.5f, 1f); private class PBackground extends Drawable { private float maxRadius, radius, x, y, dp; private int[] palette; private int darkest; private float offset; public PBackground() { randomizePalette(); } /** * set inner radius of "p" logo */ public void setRadius(float r) { this.radius = Math.max(48*dp, r); } /** * move the "p" */ public void setPosition(float x, float y) { this.x = x; this.y = y; } /** * for animating the "p" */ public void setOffset(float o) { this.offset = o; } /** * rough luminance calculation * https://www.w3.org/TR/AERT/#color-contrast */ public float lum(int rgb) { return ((Color.red(rgb) * 299f) + (Color.green(rgb) * 587f) + (Color.blue(rgb) * 114f)) / 1000f; } /** * create a random evenly-spaced color palette * guaranteed to contrast! */ public void randomizePalette() { final int slots = 2 + (int)(Math.random() * 2); float[] color = new float[] { (float) Math.random() * 360f, 1f, 1f }; palette = new int[slots]; darkest = 0; for (int i=0; i<slots; i++) { palette[i] = Color.HSVToColor(color); color[0] += 360f/slots; if (lum(palette[i]) < lum(palette[darkest])) darkest = i; } final StringBuilder str = new StringBuilder(); for (int c : palette) { str.append(String.format("#%08x ", c)); } Log.v("PlatLogoActivity", "color palette: " + str); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); public void draw(Canvas canvas) { if (dp == 0) dp = getResources().getDisplayMetrics().density; final float width = canvas.getWidth(); final float height = canvas.getHeight(); if (radius == 0) { setPosition(width / 2, height / 2); setRadius(width / 6); } final float inner_w = radius * 0.667f; final Paint paint = new Paint(); paint.setStrokeCap(Paint.Cap.BUTT); canvas.translate(x, y); Path p = new Path(); p.moveTo(-radius, height); p.lineTo(-radius, 0); p.arcTo(-radius, -radius, radius, radius, -180, 270, false); p.lineTo(-radius, radius); float w = Math.max(canvas.getWidth(), canvas.getHeight()) * 1.414f; paint.setStyle(Paint.Style.FILL); int i=0; while (w > radius*2 + inner_w*2) { paint.setColor(0xFF000000 | palette[i % palette.length]); // for a slower but more complete version: // paint.setStrokeWidth(w); // canvas.drawPath(p, paint); canvas.drawOval(-w/2, -w/2, w/2, w/2, paint); w -= inner_w * (1.1f + Math.sin((i/20f + offset) * 3.14159f)); i++; } // the innermost circle needs to be a constant color to avoid rapid flashing paint.setColor(0xFF000000 | palette[(darkest+1) % palette.length]); canvas.drawOval(-radius, -radius, radius, radius, paint); mLayout = new FrameLayout(this); setContentView(mLayout); p.reset(); p.moveTo(-radius, height); p.lineTo(-radius, 0); p.arcTo(-radius, -radius, radius, radius, -180, 270, false); p.lineTo(-radius + inner_w, radius); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(inner_w*2); paint.setColor(palette[darkest]); canvas.drawPath(p, paint); paint.setStrokeWidth(inner_w); paint.setColor(0xFFFFFFFF); canvas.drawPath(p, paint); } @Override public void onAttachedToWindow() { final DisplayMetrics dm = getResources().getDisplayMetrics(); final float dp = dm.density; final int size = (int) (Math.min(Math.min(dm.widthPixels, dm.heightPixels), 600*dp) - 100*dp); final ImageView im = new ImageView(this); final int pad = (int)(40*dp); im.setPadding(pad, pad, pad, pad); im.setTranslationZ(20); im.setScaleX(0.5f); im.setScaleY(0.5f); im.setAlpha(0f); im.setBackground(new RippleDrawable( ColorStateList.valueOf(0xFF776677), getDrawable(com.android.internal.R.drawable.platlogo), null)); im.setOutlineProvider(new ViewOutlineProvider() { public void setAlpha(int alpha) { } @Override public void getOutline(View view, Outline outline) { final int w = view.getWidth(); final int h = view.getHeight(); outline.setOval((int)(w*.125), (int)(h*.125), (int)(w*.96), (int)(h*.96)); public void setColorFilter(ColorFilter colorFilter) { } }); im.setElevation(12f*dp); im.setClickable(true); im.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { im.setOnLongClickListener(new View.OnLongClickListener() { public int getOpacity() { return 0; } } @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() { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); layout = new FrameLayout(this); setContentView(layout); bg = new PBackground(); layout.setBackground(bg); layout.setOnTouchListener(new View.OnTouchListener() { final PointerCoords pc0 = new PointerCoords(); final PointerCoords pc1 = new PointerCoords(); @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."); } if (FINISH) finish(); public boolean onTouch(View v, MotionEvent event) { switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_MOVE: if (event.getPointerCount() > 1) { event.getPointerCoords(0, pc0); event.getPointerCoords(1, pc1); bg.setRadius((float) Math.hypot(pc0.x - pc1.x, pc0.y - pc1.y) / 2f); } break; } }); return true; } }); mTapCount++; } }); // Enable hardware keyboard input for TV compatibility. im.setFocusable(true); im.requestFocus(); im.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (keyCode != KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) { ++mKeyCount; if (mKeyCount > 2) { if (mTapCount > 5) { im.performLongClick(); } else { im.performClick(); } } return true; } else { return false; } public void onStart() { super.onStart(); bg.randomizePalette(); anim = new TimeAnimator(); anim.setTimeListener( new TimeAnimator.TimeListener() { @Override public void onTimeUpdate(TimeAnimator animation, long totalTime, long deltaTime) { bg.setOffset((float) totalTime / 60000f); bg.invalidateSelf(); } }); mLayout.addView(im, new FrameLayout.LayoutParams(size, size, Gravity.CENTER)); anim.start(); } im.animate().scaleX(1f).scaleY(1f).alpha(1f) .setInterpolator(mInterpolator) .setDuration(500) .setStartDelay(800) .start(); @Override public void onStop() { if (anim != null) { anim.cancel(); anim = null; } super.onStop(); } }
core/res/res/drawable-nodpi/platlogo.xml +18 −34 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2017 The Android Open Source Project Copyright (C) 2018 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. Loading @@ -14,36 +13,21 @@ Copyright (C) 2017 The Android Open Source Project 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="48dp" android:height="48dp" android:viewportWidth="48" android:viewportHeight="48"> <group> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:name="vector" android:width="640dp" android:height="640dp" android:viewportWidth="64" android:viewportHeight="64"> <path android:fillColor="#2C292A" android:fillType="evenOdd" android:pathData="M6,26a20,20 0 0,1 40,0a20,20 0 0,1 -40,0z"/> android:name="bg" android:pathData="M 27 43 L 32 43 C 38.075 43 43 38.075 43 32 C 43 25.925 38.075 21 32 21 C 25.925 21 21 25.925 21 32 L 21 64" android:strokeColor="#6823a1" android:strokeWidth="16"/> <path android:fillColor="#FAFAFA" android:fillType="evenOdd" android:pathData="M4,24a20,20 0 0,1 40,0a20,20 0 0,1 -40,0z"/> <path android:fillColor="#2C292A" android:fillType="evenOdd" android:pathData="M2,22a20,20 0 0,1 40,0a20,20 0 0,1 -40,0z"/> <path android:fillColor="#00000000" android:strokeColor="#453F41" android:strokeWidth="1" android:fillType="evenOdd" android:pathData="M26.5 29.5v3c0 1.13-.87 2-2 2s-2-.87-2-2v-3h-1v3c0 1.13-.87 2-2 2s-2-.87-2-2v-3H17a1.5 1.5 0 0 1-1.5-1.5V17.5h13V28a1.5 1.5 0 0 1-1.5 1.5h-.5zM13.5 17.5c1.13 0 2 .87 2 2v7c0 1.13-.87 2-2 2s-2-.87-2-2v-7c0-1.13.87-2 2-2zM30.5 17.5c1.13 0 2 .87 2 2v7c0 1.13-.87 2-2 2s-2-.87-2-2v-7c0-1.13.87-2 2-2zM26.3 12.11A6.46 6.46 0 0 1 28.5 17v.5h-13V17a6.46 6.46 0 0 1 2.2-4.89l-.9-.9a.98.98 0 0 1 0-1.41.98.98 0 0 1 1.4 0l1.26 1.25A6.33 6.33 0 0 1 22 10.5c.87 0 1.73.2 2.54.55L25.8 9.8a.98.98 0 0 1 1.4 0 .98.98 0 0 1 0 1.4l-.9.91z"/> <path android:fillColor="#453F41" android:fillType="evenOdd" android:pathData="M20.16 14.5a.66.66 0 1 1-1.31 0c0-.36.29-.65.65-.65.36 0 .65.29.65.65zM25.16 14.5c0 .36-.3.66-.66.66a.65.65 0 1 1 .66-.66z"/> <path android:fillColor="#453F41" android:pathData="M22 40.5c0.36 0 0.73-0.01 1.09-0.03l-0.18-3A15.77 15.77 0 0 1 22 37.5v3zm2.17-0.13a18.48 18.48 0 0 0 1.08-0.15l-0.53-2.96c-0.3 0.05-0.6 0.1-0.9 0.13l0.35 2.98zM26.32 40a18.37 18.37 0 0 0 1.05-0.28l-0.87-2.87a15.37 15.37 0 0 1-0.88 0.23l0.7 2.92zm2.1-0.64l-1.03-2.81a15.39 15.39 0 0 0 0.84-0.34l1.2 2.74a18.39 18.39 0 0 1-1 0.41zm1.99-0.87l-1.37-2.67a15.46 15.46 0 0 0 0.8-0.44l1.52 2.59a18.46 18.46 0 0 1-0.95 0.52zm1.89-1.11l-1.67-2.5a15.55 15.55 0 0 0 0.74-0.52l1.81 2.39a18.55 18.55 0 0 1-0.88 0.63zm1.75-1.33l-1.95-2.28a15.6 15.6 0 0 0 0.67-0.61l2.09 2.15a18.6 18.6 0 0 1-0.8 0.74zm1.6-1.55l-2.22-2.02a15.6 15.6 0 0 0 0.6-0.7l2.33 1.9a18.6 18.6 0 0 1-0.72 0.82zM37 32.82l-2.43-1.76a15.53 15.53 0 0 0 0.5-0.75l2.54 1.6c-0.2 0.31-0.4 0.61-0.61 0.9zm1.15-1.8l-2.62-1.47a15.45 15.45 0 0 0 0.42-0.8l2.7 1.3a18.45 18.45 0 0 1-0.5 0.97zm0.95-1.98l-2.77-1.14a15.38 15.38 0 0 0 0.32-0.86l2.84 0.98a18.38 18.38 0 0 1-0.39 1.02zm0.72-2.09c0.1-0.34 0.18-0.7 0.26-1.05l-2.93-0.63a15.38 15.38 0 0 1-0.22 0.88l2.89 0.8zm0.46-2.15a18.52 18.52 0 0 0 0.13-1.08l-2.99-0.28a15.52 15.52 0 0 1-0.1 0.9l2.96 0.46zm0.2-2.2a18.81 18.81 0 0 0 0-1.1l-3 0.08a16 16 0 0 1 0 0.92l3 0.1zm-0.06-2.2a18.54 18.54 0 0 0-0.12-1.07l-2.97 0.43c0.04 0.3 0.08 0.6 0.1 0.9l3-0.25zm-0.31-2.15a18.39 18.39 0 0 0-0.25-1.06l-2.9 0.78a15.39 15.39 0 0 1 0.21 0.89l2.94-0.6zm-0.57-2.12l-2.85 0.95a15.37 15.37 0 0 0-0.31-0.85l2.78-1.12a18.37 18.37 0 0 1 0.38 1.02zm-0.83-2.06l-2.71 1.29a15.44 15.44 0 0 0-0.42-0.81l2.63-1.45a18.44 18.44 0 0 1 0.5 0.97zm-1.03-1.88l-2.54 1.6a15.53 15.53 0 0 0-0.5-0.76l2.44-1.74 0.6 0.9zm-1.28-1.79l-2.33 1.88a15.6 15.6 0 0 0-0.6-0.69l2.23-2.02a18.6 18.6 0 0 1 0.7 0.83zm-1.48-1.63l-2.1 2.14a15.6 15.6 0 0 0-0.67-0.62l1.97-2.26a18.6 18.6 0 0 1 0.8 0.74zM33.24 7.3l-1.82 2.38a15.55 15.55 0 0 0-0.74-0.53l1.68-2.49c0.3 0.2 0.6 0.42 0.88 0.64zm-1.71-1.17L29.98 8.7a15.47 15.47 0 0 0-0.8-0.45l1.4-2.66a18.47 18.47 0 0 1 0.95 0.54zm-1.95-1.02l-1.23 2.74A15.4 15.4 0 0 0 27.5 7.5l1.06-2.8a18.4 18.4 0 0 1 1.01 0.4zm-2.06-0.78l-0.9 2.86a15.37 15.37 0 0 0-0.87-0.24l0.72-2.92a18.37 18.37 0 0 1 1.05 0.3zM25.38 3.8a18.47 18.47 0 0 0-1.08-0.17l-0.37 2.98c0.3 0.04 0.6 0.08 0.9 0.14l0.55-2.95zm-2.2-0.27A18.75 18.75 0 0 0 22.1 3.5l-0.02 3L23 6.53l0.19-3zM21 3.53a18.6 18.6 0 0 0-1.08 0.09l0.33 2.98a15.6 15.6 0 0 1 0.91-0.08l-0.16-3zm-2.16 0.24A18.4 18.4 0 0 0 17.76 4l0.68 2.92a15.4 15.4 0 0 1 0.9-0.18l-0.51-2.96zm-2.14 0.5l0.86 2.88a15.37 15.37 0 0 0-0.86 0.28l-1.03-2.81a18.37 18.37 0 0 1 1.03-0.35zm-2.07 0.76l1.2 2.75a15.42 15.42 0 0 0-0.83 0.4L13.63 5.5a18.42 18.42 0 0 1 0.99-0.47zM12.7 6l1.5 2.6a15.5 15.5 0 0 0-0.76 0.48l-1.66-2.5A18.5 18.5 0 0 1 12.7 6zm-1.83 1.22l1.8 2.4a15.58 15.58 0 0 0-0.7 0.57L10.01 7.9a18.58 18.58 0 0 1 0.85-0.68zM9.19 8.66l2.07 2.16a15.6 15.6 0 0 0-0.63 0.65l-2.2-2.04a18.6 18.6 0 0 1 0.76-0.77zm-1.51 1.63l2.32 1.9a15.57 15.57 0 0 0-0.56 0.72l-2.42-1.76a18.57 18.57 0 0 1 0.66-0.86zm-1.23 1.69l2.52 1.62a15.5 15.5 0 0 0-0.47 0.78l-2.61-1.47a18.5 18.5 0 0 1 0.56-0.93zm-1.08 1.9l2.7 1.32a15.41 15.41 0 0 0-0.38 0.83l-2.77-1.15a18.41 18.41 0 0 1 0.45-1zm-0.85 2.04l2.84 0.98a15.37 15.37 0 0 0-0.28 0.87L4.2 16.96c0.1-0.35 0.2-0.7 0.32-1.04zm-0.6 2.12a18.43 18.43 0 0 0-0.2 1.07l2.97 0.47c0.05-0.3 0.1-0.6 0.17-0.9l-2.93-0.64zm-0.34 2.18a18.65 18.65 0 0 0-0.07 1.09l3 0.11 0.06-0.91-2.99-0.29zm-0.08 2.2a18.7 18.7 0 0 0 0.06 1.1l3-0.25a15.7 15.7 0 0 1-0.06-0.91l-3 0.07zm0.18 2.18a18.44 18.44 0 0 0 0.18 1.07l2.95-0.6a15.44 15.44 0 0 1-0.16-0.9L3.68 24.6zm0.43 2.14l2.9-0.77a15.37 15.37 0 0 0 0.26 0.88l-2.85 0.94a18.37 18.37 0 0 1-0.3-1.05zm0.7 2.1l2.78-1.11a15.4 15.4 0 0 0 0.36 0.83l-2.71 1.27a18.4 18.4 0 0 1-0.44-1zm0.9 1.95l2.65-1.43a15.48 15.48 0 0 0 0.45 0.8l-2.55 1.57a18.48 18.48 0 0 1-0.54-0.94zm1.17 1.87l2.45-1.73a15.56 15.56 0 0 0 0.54 0.73l-2.34 1.87a18.56 18.56 0 0 1-0.65-0.87zm1.37 1.72l2.23-2a15.6 15.6 0 0 0 0.63 0.65l-2.1 2.14a18.6 18.6 0 0 1-0.76-0.79zm1.58 1.56l1.98-2.26c0.22 0.2 0.46 0.39 0.7 0.58l-1.84 2.37a18.59 18.59 0 0 1-0.84-0.7zm1.66 1.28l1.7-2.46a15.52 15.52 0 0 0 0.77 0.5l-1.56 2.56a18.52 18.52 0 0 1-0.91-0.6zm1.87 1.14l1.4-2.65a15.43 15.43 0 0 0 0.82 0.4l-1.24 2.73a18.43 18.43 0 0 1-0.98-0.48zm2 0.91l1.08-2.8a15.37 15.37 0 0 0 0.86 0.3l-0.9 2.86a18.37 18.37 0 0 1-1.04-0.36zm2.1 0.67a18.4 18.4 0 0 0 1.07 0.23l0.56-2.94a15.4 15.4 0 0 1-0.9-0.2l-0.72 2.91zm2.18 0.41a18.57 18.57 0 0 0 1.08 0.1l0.2-2.99a15.57 15.57 0 0 1-0.9-0.09l-0.38 2.98zm2.2 0.15H22v-3h-0.13l-0.03 3z"/> </group> android:name="fg" android:pathData="M 29 43 L 32 43 C 38.075 43 43 38.075 43 32 C 43 25.925 38.075 21 32 21 C 25.925 21 21 25.925 21 32 L 21 64" android:strokeColor="#ff0000" android:strokeWidth="8"/> </vector>
core/res/res/drawable-nodpi/platlogo_m.xml +0 −19 Original line number Diff line number Diff line Loading @@ -18,23 +18,4 @@ Copyright (C) 2017 The Android Open Source Project android:height="480dp" android:viewportWidth="48.0" android:viewportHeight="48.0"> <!--<path android:pathData="M25.0,25.0m-20.5,0.0a20.5,20.5,0,1,1,41.0,0.0a20.5,20.5,0,1,1,-41.0,0.0" android:fillAlpha="0.066" android:fillColor="#000000"/>--> <path android:pathData="M24.0,24.0m-20.0,0.0a20.0,20.0,0,1,1,40.0,0.0a20.0,20.0,0,1,1,-40.0,0.0" android:fillColor="#FFC107"/> <path android:pathData="M44,24.2010101 L33.9004889,14.101499 L14.101499,33.9004889 L24.2010101,44 C29.2525804,43.9497929 34.2887564,41.9975027 38.1431296,38.1431296 C41.9975027,34.2887564 43.9497929,29.2525804 44,24.2010101 Z" android:fillColor="#FE9F00"/> <path android:pathData="M24.0,24.0m-14.0,0.0a14.0,14.0,0,1,1,28.0,0.0a14.0,14.0,0,1,1,-28.0,0.0" android:fillColor="#FED44F"/> <path android:pathData="M37.7829445,26.469236 L29.6578482,18.3441397 L18.3441397,29.6578482 L26.469236,37.7829445 C29.1911841,37.2979273 31.7972024,36.0037754 33.9004889,33.9004889 C36.0037754,31.7972024 37.2979273,29.1911841 37.7829445,26.469236 Z" android:fillColor="#FFC107"/> <path android:pathData="M24.0,24.0m-8.0,0.0a8.0,8.0,0,1,1,16.0,0.0a8.0,8.0,0,1,1,-16.0,0.0" android:fillColor="#FFFFFF"/> </vector>
core/res/res/drawable-nodpi/stat_sys_adb.xml +19 −20 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2017 The Android Open Source Project Copyright (C) 2018 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. Loading @@ -14,24 +13,24 @@ Copyright (C) 2017 The Android Open Source Project 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="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <group> <vector xmlns:android="http://schemas.android.com/apk/res/android" android:name="vector" android:width="48dp" android:height="48dp" android:viewportWidth="48" android:viewportHeight="48"> <group android:name="stat_sys_adb"> <path android:fillColor="#FFFFFF" android:fillAlpha=".33" android:fillType="evenOdd" android:pathData="M5.71 18.29A8.99 8.99 0 0 0 22 13c0-3-1.46-5.65-3.71-7.29A8.99 8.99 0 0 0 2 11c0 3 1.46 5.65 3.71 7.29z"/> android:name="outer" android:pathData="M 18 30 L 24 30 C 29.523 30 34 25.523 34 20 C 34 14.477 29.523 10 24 10 C 18.477 10 14 14.477 14 20 L 14 44" android:strokeColor="#000000" android:strokeWidth="10"/> <path android:fillColor="#FFFFFF" android:fillType="evenOdd" android:pathData="M7.25 19.18A8.5 8.5 0 0 0 19.19 7.24 9 9 0 0 1 7.24 19.19z"/> <path android:fillColor="#FFFFFF" android:fillAlpha=".33" android:pathData="M10.5 3a0.5 0.5 0 1 1 1 0v2.05a0.5 0.5 0 1 1-1 0V3zm3.1 0.42a0.5 0.5 0 0 1 0.93 0.39l-0.8 1.88A0.5 0.5 0 1 1 12.8 5.3l0.8-1.88zm2.7 1.57a0.5 0.5 0 1 1 0.71 0.7l-1.45 1.46a0.5 0.5 0 0 1-0.7-0.71l1.44-1.45zm1.9 2.5a0.5 0.5 0 0 1 0.38 0.92l-1.9 0.77a0.5 0.5 0 0 1-0.37-0.93l1.9-0.77zM19 10.5a0.5 0.5 0 1 1 0 1h-2.05a0.5 0.5 0 0 1 0-1H19zm-0.42 3.1a0.5 0.5 0 0 1-0.39 0.93l-1.88-0.8a0.5 0.5 0 1 1 0.39-0.92l1.88 0.8zm-1.57 2.7a0.5 0.5 0 1 1-0.7 0.71l-1.46-1.45a0.5 0.5 0 0 1 0.71-0.7l1.45 1.44zm-2.5 1.9a0.5 0.5 0 1 1-0.92 0.38l-0.77-1.9a0.5 0.5 0 0 1 0.93-0.37l0.77 1.9zM11.5 19a0.5 0.5 0 1 1-1 0v-2.05a0.5 0.5 0 0 1 1 0V19zm-3.1-0.42a0.5 0.5 0 0 1-0.93-0.39l0.8-1.88A0.5 0.5 0 0 1 9.2 16.7l-0.8 1.88zm-2.7-1.57a0.5 0.5 0 1 1-0.71-0.7l1.45-1.46a0.5 0.5 0 0 1 0.7 0.71L5.7 17.01zm-1.9-2.48a0.5 0.5 0 0 1-0.38-0.92l1.88-0.8a0.5 0.5 0 0 1 0.4 0.92l-1.9 0.8zM3 11.5a0.5 0.5 0 1 1 0-1h2.05a0.5 0.5 0 1 1 0 1H3zm0.42-3.1A0.5 0.5 0 0 1 3.8 7.46l1.88 0.8A0.5 0.5 0 1 1 5.3 9.2L3.42 8.4zm1.57-2.7a0.5 0.5 0 1 1 0.7-0.71l1.46 1.45a0.5 0.5 0 0 1-0.71 0.7L4.99 5.7zm2.5-1.9A0.5 0.5 0 0 1 8.4 3.41l0.77 1.9a0.5 0.5 0 0 1-0.93 0.37L7.48 3.8z"/> android:name="inner" android:pathData="M 19 30 L 24 30 C 29.523 30 34 25.523 34 20 C 34 14.477 29.523 10 24 10 C 18.477 10 14 14.477 14 20 L 14 44" android:strokeColor="#000000" android:strokeAlpha="0" android:strokeWidth="6"/> </group> </vector>