Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28ed00d3 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Fix RenderScript crash." into klp-dev

parents a751d97e a30b7035
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
+29 −0
Original line number Diff line number Diff line
@@ -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"
+2 −2
Original line number Diff line number Diff line
@@ -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>
+37 −0
Original line number Diff line number Diff line
/*
 * 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();
    }
}
+39 −0
Original line number Diff line number Diff line
/*
 * 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();
    }
}