Add standalone versions of the wallpapers.

Change-Id: I1b0e744d7e37eaede7aec7b205fd106e2aded6ef
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 0194d83..e602eae 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -25,6 +25,30 @@
         android:label="@string/wallpapers"
         android:icon="@drawable/ic_launcher_wallpaper">
 
+        <activity
+            android:label="@string/wallpaper_grass"
+            android:name="com.android.wallpaper.grass.Grass"
+            android:theme="@android:style/Theme.NoTitleBar">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+
+        </activity>
+        
+        <activity
+            android:label="@string/wallpaper_galaxy"
+            android:name="com.android.wallpaper.galaxy.Galaxy"
+            android:theme="@android:style/Theme.NoTitleBar">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+
+        </activity>
+        
         <service
             android:label="@string/wallpaper_grass"
             android:name="com.android.wallpaper.grass.GrassWallpaper"
diff --git a/src/com/android/wallpaper/galaxy/Galaxy.java b/src/com/android/wallpaper/galaxy/Galaxy.java
new file mode 100644
index 0000000..3103651
--- /dev/null
+++ b/src/com/android/wallpaper/galaxy/Galaxy.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 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.wallpaper.galaxy;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class Galaxy extends Activity {
+    private GalaxyView mView;
+
+    @Override
+    public void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+
+        mView = new GalaxyView(this);
+        setContentView(mView);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        mView.onResume();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        mView.onPause();
+
+        Runtime.getRuntime().exit(0);
+    }
+}
diff --git a/src/com/android/wallpaper/galaxy/GalaxyView.java b/src/com/android/wallpaper/galaxy/GalaxyView.java
new file mode 100644
index 0000000..11c46ee
--- /dev/null
+++ b/src/com/android/wallpaper/galaxy/GalaxyView.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009 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.wallpaper.galaxy;
+
+import android.renderscript.RSSurfaceView;
+import android.renderscript.RenderScript;
+import android.content.Context;
+import android.view.SurfaceHolder;
+
+class GalaxyView extends RSSurfaceView {
+
+    public GalaxyView(Context context) {
+        super(context);
+        setFocusable(true);
+        setFocusableInTouchMode(true);
+    }
+
+    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
+        super.surfaceChanged(holder, format, w, h);
+
+        RenderScript RS = createRenderScript(false);
+        GalaxyRS render = new GalaxyRS(w, h);
+        render.init(RS, getResources());
+        render.setOffset(0.5f, 0.0f, 0, 0);
+        render.start();
+    }
+}
+
diff --git a/src/com/android/wallpaper/grass/Grass.java b/src/com/android/wallpaper/grass/Grass.java
new file mode 100644
index 0000000..22a5b25
--- /dev/null
+++ b/src/com/android/wallpaper/grass/Grass.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2009 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.wallpaper.grass;
+
+import android.app.Activity;
+import android.os.Bundle;
+
+public class Grass extends Activity {
+    private GrassView mView;
+
+    @Override
+    public void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+
+        mView = new GrassView(this);
+        setContentView(mView);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        mView.onResume();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        mView.onPause();
+
+        Runtime.getRuntime().exit(0);
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/wallpaper/grass/GrassView.java b/src/com/android/wallpaper/grass/GrassView.java
new file mode 100644
index 0000000..b8c2d8a
--- /dev/null
+++ b/src/com/android/wallpaper/grass/GrassView.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2009 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.wallpaper.grass;
+
+import android.renderscript.RSSurfaceView;
+import android.renderscript.RenderScript;
+import android.content.Context;
+import android.view.SurfaceHolder;
+
+class GrassView extends RSSurfaceView {
+
+    public GrassView(Context context) {
+        super(context);
+        setFocusable(true);
+        setFocusableInTouchMode(true);
+    }
+
+    public void surfaceChanged(SurfaceHolder holder, int format, int w, int h) {
+        super.surfaceChanged(holder, format, w, h);
+
+        RenderScript RS = createRenderScript(false);
+        GrassRS render = new GrassRS(w, h);
+        render.init(RS, getResources());
+        render.setOffset(0.5f, 0.0f, 0, 0);        
+        render.start();
+    }
+}
\ No newline at end of file