diff options
5 files changed, 107 insertions, 4 deletions
diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java index 91c47d1450fa..f2eee456b6a4 100644 --- a/core/java/com/android/internal/app/PlatLogoActivity.java +++ b/core/java/com/android/internal/app/PlatLogoActivity.java @@ -70,7 +70,6 @@ public class PlatLogoActivity extends Activity { letter.setTextSize(300); letter.setTextColor(0xFFFFFFFF); letter.setGravity(Gravity.CENTER); - letter.setShadowLayer(12*metrics.density, 0, 0, 0xC085F985); letter.setText(String.valueOf(Build.VERSION.RELEASE).substring(0, 1)); final int p = (int)(4 * metrics.density); @@ -81,7 +80,6 @@ public class PlatLogoActivity extends Activity { tv.setPadding(p, p, p, p); tv.setTextColor(0xFFFFFFFF); tv.setGravity(Gravity.CENTER); - tv.setShadowLayer(4 * metrics.density, 0, 2 * metrics.density, 0x66000000); tv.setTransformationMethod(new AllCapsTransformationMethod(this)); tv.setText("Android " + Build.VERSION.RELEASE); tv.setVisibility(View.INVISIBLE); diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 5e198a2f1639..fa5c76907767 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -189,6 +189,35 @@ android:taskAffinity="com.android.systemui.net" android:excludeFromRecents="true" /> + <!-- platform logo easter egg activity --> + <activity + android:name=".DessertCase" + android:exported="true" + android:label="@string/dessert_case" + android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen" + android:hardwareAccelerated="true" + android:launchMode="singleInstance" + 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> + + <!-- a gallery of delicious treats --> + <service + android:name=".DessertCaseDream" + android:exported="true" + android:label="@string/dessert_case" + android:enabled="false" + > + <intent-filter> + <action android:name="android.service.dreams.DreamService" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </service> + <activity android:name=".Somnambulator" android:label="@string/start_dreams" android:icon="@mipmap/ic_launcher_dreams" diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index bbfe383d5c52..7fdd30847dda 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -431,8 +431,8 @@ <!-- Description of the button in the phone-style notification panel that controls auto-rotation, when auto-rotation is off. [CHAR LIMIT=NONE] --> <string name="accessibility_rotation_lock_on_portrait">Screen is locked in portrait orientation.</string> - <!-- Name of the Jelly Bean platlogo screensaver --> - <string name="jelly_bean_dream_name">BeanFlinger</string> + <!-- Name of the K-release easter egg: a display case for all our tastiest desserts. [CHAR LIMIT=30] --> + <string name="dessert_case">Dessert Case</string> <!-- Name of the launcher shortcut icon that allows dreams to be started immediately [CHAR LIMIT=20] --> <string name="start_dreams">Daydream</string> diff --git a/packages/SystemUI/src/com/android/systemui/DessertCase.java b/packages/SystemUI/src/com/android/systemui/DessertCase.java new file mode 100644 index 000000000000..b6424af03f77 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/DessertCase.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2013 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; + +import android.app.Activity; +import android.content.ComponentName; +import android.content.pm.PackageManager; +import android.util.Slog; + +public class DessertCase extends Activity { + + @Override + public void onStart() { + super.onStart(); + + Slog.v("DessertCase", "ACHIEVEMENT UNLOCKED"); + PackageManager pm = getPackageManager(); + pm.setComponentEnabledSetting(new ComponentName(this, DessertCaseDream.class), + PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0); + + finish(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/DessertCaseDream.java b/packages/SystemUI/src/com/android/systemui/DessertCaseDream.java new file mode 100644 index 000000000000..022e4d83a194 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/DessertCaseDream.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2013 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; + +import android.service.dreams.DreamService; + +public class DessertCaseDream extends DreamService { + + @Override + public void onAttachedToWindow() { + super.onAttachedToWindow(); + setInteractive(true); + setFullscreen(true); + } + + @Override + public void onDreamingStarted() { + super.onDreamingStarted(); + } + + @Override + public void onDreamingStopped() { + super.onDreamingStopped(); + } +} |