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

Commit 68cff8c1 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "Beans in space." into jb-mr1-dev

parents aea57c8b f07439fb
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -179,5 +179,17 @@
<!--            <category android:name="android.intent.category.LAUNCHER" />-->
            </intent-filter>
        </activity>

        <!-- Beans in space -->
        <service
            android:name=".BeanBagDream"
            android:exported="true"
            android:label="Beans in space">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.DREAM" />
            </intent-filter>
        </service>
    </application>
</manifest>
+31 −0
Original line number Diff line number Diff line
package com.android.systemui;

import android.service.dreams.Dream;

import com.android.systemui.BeanBag.Board;

public class BeanBagDream extends Dream {

    private Board mBoard;

    @Override
    public void onStart() {
        super.onStart();
        setInteractive(true);
        mBoard = new Board(this, null);
    }

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        setContentView(mBoard);
        lightsOut();
        mBoard.startAnimation();
    }

    @Override
    public void finish() {
        mBoard.stopAnimation();
        super.finish();
    }
}