Skip to content

Commit 765a4dd

Browse files
author
schlimme-gegend
committed
Added empty activity to be able to connect a debugger before the wallpaper is started.
1 parent 26c981f commit 765a4dd

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

core/src/processing/android/PWallpaper.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,16 @@ public Engine onCreateEngine() {
119119
@Override
120120
public void onDestroy() {
121121
super.onDestroy();
122-
if (engine != null) engine.onDestroy();
122+
123+
if (engine != null){
124+
//engine.sketch = null;
125+
engine.onDestroy();
126+
}
123127
}
124128

125129

126130
public class WallpaperEngine extends Engine implements ServiceEngine {
127-
private PApplet sketch;
131+
PApplet sketch;
128132
private float xOffset, xOffsetStep;
129133
private float yOffset, yOffsetStep;
130134
private int xPixelOffset, yPixelOffset;

studio/apps/wallpaper/src/main/AndroidManifest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,11 @@
1010
<meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper"/>
1111
</service>
1212
<activity android:name="processing.android.PermissionRequestor"/>
13+
<activity android:name=".DebuggerEntryPointActivity">
14+
<intent-filter>
15+
<action android:name="android.intent.action.MAIN" />
16+
<category android:name="android.intent.category.LAUNCHER" />
17+
</intent-filter>
18+
</activity>
1319
</application>
1420
</manifest>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package wallpaper;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
import android.support.annotation.Nullable;
6+
7+
public class DebuggerEntryPointActivity extends Activity {
8+
@Override
9+
protected void onCreate(@Nullable Bundle savedInstanceState) {
10+
super.onCreate(savedInstanceState);
11+
}
12+
}

0 commit comments

Comments
 (0)