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

This commit is contained in:
John Spurlock
2012-08-27 08:08:10 -07:00
committed by Android (Google) Code Review
2 changed files with 43 additions and 0 deletions

View File

@@ -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>

View File

@@ -0,0 +1,31 @@
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();
}
}