summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/com/android/internal/app/PlatLogoActivity.java70
-rw-r--r--core/res/AndroidManifest.xml2
-rw-r--r--core/res/res/drawable-nodpi/platlogo.xml28
3 files changed, 82 insertions, 18 deletions
diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java
index b7f6a615a452..bf265689c0e0 100644
--- a/core/java/com/android/internal/app/PlatLogoActivity.java
+++ b/core/java/com/android/internal/app/PlatLogoActivity.java
@@ -103,6 +103,7 @@ public class PlatLogoActivity extends Activity {
mBg.padding = 0.5f * dp;
mBg.minR = 1 * dp;
layout.setBackground(mBg);
+ layout.setOnLongClickListener(mBg);
setContentView(layout);
}
@@ -291,8 +292,8 @@ public class PlatLogoActivity extends Activity {
return true;
case MotionEvent.ACTION_UP:
- if (mOverrideMinute == 0 && (mOverrideHour % 12) == 0) {
- Log.v(TAG, "12:00 let's gooooo");
+ if (mOverrideMinute == 0 && (mOverrideHour % 12) == 1) {
+ Log.v(TAG, "13:00");
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
launchNextStage(false);
}
@@ -302,18 +303,45 @@ public class PlatLogoActivity extends Activity {
}
}
+ private static final String[][] EMOJI_SETS = {
+ {"๐Ÿ‡", "๐Ÿˆ", "๐Ÿ‰", "๐ŸŠ", "๐Ÿ‹", "๐ŸŒ", "๐Ÿ", "๐Ÿฅญ", "๐ŸŽ", "๐Ÿ", "๐Ÿ", "๐Ÿ‘",
+ "๐Ÿ’", "๐Ÿ“", "๐Ÿซ", "๐Ÿฅ"},
+ {"๐Ÿ˜บ", "๐Ÿ˜ธ", "๐Ÿ˜น", "๐Ÿ˜ป", "๐Ÿ˜ผ", "๐Ÿ˜ฝ", "๐Ÿ™€", "๐Ÿ˜ฟ", "๐Ÿ˜พ"},
+ {"๐Ÿ˜€", "๐Ÿ˜ƒ", "๐Ÿ˜„", "๐Ÿ˜", "๐Ÿ˜†", "๐Ÿ˜…", "๐Ÿคฃ", "๐Ÿ˜‚", "๐Ÿ™‚", "๐Ÿ™ƒ", "๐Ÿซ ", "๐Ÿ˜‰", "๐Ÿ˜Š",
+ "๐Ÿ˜‡", "๐Ÿฅฐ", "๐Ÿ˜", "๐Ÿคฉ", "๐Ÿ˜˜", "๐Ÿ˜—", "โ˜บ๏ธ", "๐Ÿ˜š", "๐Ÿ˜™", "๐Ÿฅฒ", "๐Ÿ˜‹", "๐Ÿ˜›", "๐Ÿ˜œ",
+ "๐Ÿคช", "๐Ÿ˜", "๐Ÿค‘", "๐Ÿค—", "๐Ÿคญ", "๐Ÿซข", "๐Ÿซฃ", "๐Ÿคซ", "๐Ÿค”", "๐Ÿซก", "๐Ÿค", "๐Ÿคจ", "๐Ÿ˜",
+ "๐Ÿ˜‘", "๐Ÿ˜ถ", "๐Ÿซฅ", "๐Ÿ˜", "๐Ÿ˜’", "๐Ÿ™„", "๐Ÿ˜ฌ", "๐Ÿคฅ", "๐Ÿ˜Œ", "๐Ÿ˜”", "๐Ÿ˜ช", "๐Ÿคค", "๐Ÿ˜ด",
+ "๐Ÿ˜ท"},
+ { "๐Ÿคฉ", "๐Ÿ˜", "๐Ÿฅฐ", "๐Ÿ˜˜", "๐Ÿฅณ", "๐Ÿฅฒ", "๐Ÿฅน" },
+ { "๐Ÿซ " },
+ {"๐Ÿ’˜", "๐Ÿ’", "๐Ÿ’–", "๐Ÿ’—", "๐Ÿ’“", "๐Ÿ’ž", "๐Ÿ’•", "โฃ", "๐Ÿ’”", "โค", "๐Ÿงก", "๐Ÿ’›",
+ "๐Ÿ’š", "๐Ÿ’™", "๐Ÿ’œ", "๐ŸคŽ", "๐Ÿ–ค", "๐Ÿค"},
+ // {"๐Ÿ‘", "๏ธ๐Ÿซฆ", "๐Ÿ‘๏ธ"}, // this one is too much
+ {"๐Ÿ‘ฝ", "๐Ÿ›ธ", "โœจ", "๐ŸŒŸ", "๐Ÿ’ซ", "๐Ÿš€", "๐Ÿช", "๐ŸŒ™", "โญ", "๐ŸŒ"},
+ {"๐ŸŒ‘", "๐ŸŒ’", "๐ŸŒ“", "๐ŸŒ”", "๐ŸŒ•", "๐ŸŒ–", "๐ŸŒ—", "๐ŸŒ˜"},
+ {"๐Ÿ™", "๐Ÿชธ", "๐Ÿฆ‘", "๐Ÿฆ€", "๐Ÿฆ", "๐Ÿก", "๐Ÿฆž", "๐Ÿ ", "๐ŸŸ", "๐Ÿณ", "๐Ÿ‹", "๐Ÿฌ", "๐Ÿซง", "๐ŸŒŠ",
+ "๐Ÿฆˆ"},
+ {"๐Ÿ™ˆ", "๐Ÿ™‰", "๐Ÿ™Š", "๐Ÿต", "๐Ÿ’"},
+ {"โ™ˆ", "โ™‰", "โ™Š", "โ™‹", "โ™Œ", "โ™", "โ™Ž", "โ™", "โ™", "โ™‘", "โ™’", "โ™“"},
+ {"๐Ÿ•›", "๐Ÿ•ง", "๐Ÿ•", "๐Ÿ•œ", "๐Ÿ•‘", "๐Ÿ•", "๐Ÿ•’", "๐Ÿ•ž", "๐Ÿ•“", "๐Ÿ•Ÿ", "๐Ÿ•”", "๐Ÿ• ", "๐Ÿ••", "๐Ÿ•ก",
+ "๐Ÿ•–", "๐Ÿ•ข", "๐Ÿ•—", "๐Ÿ•ฃ", "๐Ÿ•˜", "๐Ÿ•ค", "๐Ÿ•™", "๐Ÿ•ฅ", "๐Ÿ•š", "๐Ÿ•ฆ"},
+ {"๐ŸŒบ", "๐ŸŒธ", "๐Ÿ’ฎ", "๐Ÿต๏ธ", "๐ŸŒผ", "๐ŸŒฟ"},
+ {"๐Ÿข", "โœจ", "๐ŸŒŸ", "๐Ÿ‘‘"}
+ };
+
static class Bubble {
public float x, y, r;
public int color;
+ public String text = null;
}
- class BubblesDrawable extends Drawable {
+ class BubblesDrawable extends Drawable implements View.OnLongClickListener {
private static final int MAX_BUBBS = 2000;
private final int[] mColorIds = {
- android.R.color.system_accent1_400,
- android.R.color.system_accent1_500,
- android.R.color.system_accent1_600,
+ android.R.color.system_accent3_400,
+ android.R.color.system_accent3_500,
+ android.R.color.system_accent3_600,
android.R.color.system_accent2_400,
android.R.color.system_accent2_500,
@@ -322,6 +350,8 @@ public class PlatLogoActivity extends Activity {
private int[] mColors = new int[mColorIds.length];
+ private int mEmojiSet = -1;
+
private final Bubble[] mBubbs = new Bubble[MAX_BUBBS];
private int mNumBubbs;
@@ -342,17 +372,34 @@ public class PlatLogoActivity extends Activity {
@Override
public void draw(Canvas canvas) {
+ if (getLevel() == 0) return;
final float f = getLevel() / 10000f;
mPaint.setStyle(Paint.Style.FILL);
+ mPaint.setTextAlign(Paint.Align.CENTER);
int drawn = 0;
for (int j = 0; j < mNumBubbs; j++) {
if (mBubbs[j].color == 0 || mBubbs[j].r == 0) continue;
- mPaint.setColor(mBubbs[j].color);
- canvas.drawCircle(mBubbs[j].x, mBubbs[j].y, mBubbs[j].r * f, mPaint);
+ if (mBubbs[j].text != null) {
+ mPaint.setTextSize(mBubbs[j].r * 1.75f);
+ canvas.drawText(mBubbs[j].text, mBubbs[j].x,
+ mBubbs[j].y + mBubbs[j].r * f * 0.6f, mPaint);
+ } else {
+ mPaint.setColor(mBubbs[j].color);
+ canvas.drawCircle(mBubbs[j].x, mBubbs[j].y, mBubbs[j].r * f, mPaint);
+ }
drawn++;
}
}
+ public void chooseEmojiSet() {
+ mEmojiSet = (int) (Math.random() * EMOJI_SETS.length);
+ final String[] emojiSet = EMOJI_SETS[mEmojiSet];
+ for (int j = 0; j < mBubbs.length; j++) {
+ mBubbs[j].text = emojiSet[(int) (Math.random() * emojiSet.length)];
+ }
+ invalidateSelf();
+ }
+
@Override
protected boolean onLevelChange(int level) {
invalidateSelf();
@@ -423,6 +470,13 @@ public class PlatLogoActivity extends Activity {
public int getOpacity() {
return TRANSLUCENT;
}
+
+ @Override
+ public boolean onLongClick(View v) {
+ if (getLevel() == 0) return false;
+ chooseEmojiSet();
+ return true;
+ }
}
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index e52da0fd6787..7439b2f0921f 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -6628,7 +6628,7 @@
android:process=":ui">
</activity>
<activity android:name="com.android.internal.app.PlatLogoActivity"
- android:theme="@style/Theme.DeviceDefault.Wallpaper.NoTitleBar"
+ android:theme="@style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:icon="@drawable/platlogo"
android:process=":ui">
diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml
index f816d0c41349..da214868ca05 100644
--- a/core/res/res/drawable-nodpi/platlogo.xml
+++ b/core/res/res/drawable-nodpi/platlogo.xml
@@ -19,17 +19,27 @@ Copyright (C) 2021 The Android Open Source Project
android:viewportWidth="24"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
- android:pathData="M11 0.51a2.06 2.06 0 0 1 2 0l0.58 0.37a4.15 4.15 0 0 0 2.23 0.55l0.69-0.06a2.07 2.07 0 0 1 1.81 0.95l0.33 0.6a4.14 4.14 0 0 0 1.72 1.52l0.64 0.27a2 2 0 0 1 1.16 1.68l0 0.69A4.12 4.12 0 0 0 23 9.23l0.44 0.53a2.06 2.06 0 0 1 0.24 2l-0.3 0.62a4.14 4.14 0 0 0-0.27 2.28l0.14 0.68a2.08 2.08 0 0 1-0.72 1.91l-0.56 0.41a4 4 0 0 0-1.3 1.89l-0.19 0.66A2.06 2.06 0 0 1 19 21.58l-0.68 0.11a4.09 4.09 0 0 0-2 1.07l-0.48 0.5a2.08 2.08 0 0 1-2 0.49l-0.65-0.23a4.28 4.28 0 0 0-2.3 0l-0.65 0.23a2.08 2.08 0 0 1-2-0.49l-0.48-0.5a4 4 0 0 0-2-1.07L5 21.58A2.06 2.06 0 0 1 3.5 20.23l-0.19-0.66A4 4 0 0 0 2 17.68l-0.56-0.41a2.08 2.08 0 0 1-0.72-1.91l0.14-0.68A4.14 4.14 0 0 0 0.6 12.4l-0.3-0.62a2.06 2.06 0 0 1 0.24-2L1 9.23A4.16 4.16 0 0 0 1.8 7.08l0-0.69A2 2 0 0 1 3 4.71l0.64-0.27A4.14 4.14 0 0 0 5.34 2.92l0.33-0.6a2.07 2.07 0 0 1 1.81-0.95l0.69 0.06A4.15 4.15 0 0 0 10.4 0.88Z"
- android:fillColor="@android:color/system_accent3_400"
+ android:fillColor="@android:color/system_accent1_400"
+ android:pathData="M11,0.3c0.6,-0.3 1.4,-0.3 2,0l0.6,0.4c0.7,0.4 1.4,0.6 2.2,0.6l0.7,-0.1c0.7,0 1.4,0.3 1.8,0.9l0.3,0.6c0.4,0.7 1,1.2 1.7,1.5L21,4.5c0.7,0.3 1.1,0.9 1.2,1.7v0.7C22.2,7.7 22.5,8.4 23,9l0.4,0.5c0.4,0.6 0.5,1.3 0.2,2l-0.3,0.6c-0.3,0.7 -0.4,1.5 -0.3,2.3l0.1,0.7c0.1,0.7 -0.2,1.4 -0.7,1.9L22,17.5c-0.6,0.5 -1.1,1.1 -1.3,1.9L20.5,20c-0.2,0.7 -0.8,1.2 -1.5,1.4l-0.7,0.1c-0.8,0.2 -1.4,0.5 -2,1.1l-0.5,0.5c-0.5,0.5 -1.3,0.7 -2,0.5l-0.6,-0.2c-0.8,-0.2 -1.5,-0.2 -2.3,0l-0.6,0.2c-0.7,0.2 -1.5,0 -2,-0.5l-0.5,-0.5c-0.5,-0.5 -1.2,-0.9 -2,-1.1L5,21.4c-0.7,-0.2 -1.3,-0.7 -1.5,-1.4l-0.2,-0.7C3.1,18.6 2.6,18 2,17.5l-0.6,-0.4c-0.6,-0.5 -0.8,-1.2 -0.7,-1.9l0.1,-0.7c0.1,-0.8 0,-1.6 -0.3,-2.3l-0.3,-0.6c-0.3,-0.7 -0.2,-1.4 0.2,-2L1,9c0.5,-0.6 0.7,-1.4 0.8,-2.2V6.2C1.9,5.5 2.3,4.8 3,4.5l0.6,-0.3c0.7,-0.3 1.3,-0.9 1.7,-1.5l0.3,-0.6c0.4,-0.6 1.1,-1 1.8,-0.9l0.7,0.1c0.8,0 1.6,-0.2 2.2,-0.6L11,0.3z"
/>
<path
- android:pathData="M12.34 6.53h4.05l-2 4.05a3.95 3.95 0 0 1-0.57 7.85 4.1 4.1 0 0 1-1.45-0.27"
- android:strokeColor="@android:color/system_accent1_800"
- android:strokeWidth="2"/>
+ android:pathData="M6.3,6.5l3,0l0,12.2"
+ android:strokeWidth="2.22"
+ android:strokeColor="@android:color/system_accent3_800"
+ />
+ <path
+ android:pathData="M12.3,6.5h4l-2,4c2.2,0.3 3.6,2.4 3.3,4.5c-0.3,1.9 -1.9,3.3 -3.8,3.3c-0.5,0 -1,-0.1 -1.4,-0.3"
+ android:strokeWidth="2.22"
+ android:strokeColor="@android:color/system_accent3_800"
+ />
<path
- android:pathData="M12.34 6.53h4.05l-2 4.05a3.95 3.95 0 0 1-0.57 7.85 4.1 4.1 0 0 1-1.45-0.27"
+ android:pathData="M6.3,6.5l3,0l0,12.2"
+ android:strokeWidth="0.56"
android:strokeColor="@android:color/system_neutral1_100"
- android:strokeWidth="0.5"/>
-
+ />
+ <path
+ android:pathData="M12.3,6.5h4l-2,4c2.2,0.3 3.6,2.4 3.3,4.5c-0.3,1.9 -1.9,3.3 -3.8,3.3c-0.5,0 -1,-0.1 -1.4,-0.3"
+ android:strokeWidth="0.56"
+ android:strokeColor="@android:color/system_neutral1_100"
+ />
</vector>
-