OSDN Git Service

Fix RenderScript crash.
authorDaniel Sandler <dsandler@android.com>
Mon, 16 Sep 2013 14:16:49 +0000 (10:16 -0400)
committerDaniel Sandler <dsandler@android.com>
Mon, 16 Sep 2013 15:19:15 +0000 (11:19 -0400)
Also lay the groundwork for a future checkin.

Bug: 10240151
Bug: 10505742
Change-Id: I62d61c9048188c93863c8c43839e713b75a65102

core/java/com/android/internal/app/PlatLogoActivity.java
packages/SystemUI/AndroidManifest.xml
packages/SystemUI/res/values/strings.xml
packages/SystemUI/src/com/android/systemui/DessertCase.java [new file with mode: 0644]
packages/SystemUI/src/com/android/systemui/DessertCaseDream.java [new file with mode: 0644]

index 91c47d1..f2eee45 100644 (file)
@@ -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);
index 5e198a2..fa5c769 100644 (file)
             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"
index bbfe383..7fdd308 100644 (file)
     <!-- 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 (file)
index 0000000..b6424af
--- /dev/null
@@ -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 (file)
index 0000000..022e4d8
--- /dev/null
@@ -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();
+    }
+}