Skip to content

Commit 326187d

Browse files
committed
don't add wallpaper, watchface and cardboard permissions back in again
the manifest
1 parent d074f73 commit 326187d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/processing/mode/android/Manifest.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,17 @@ public void setPermissions(String[] names) {
163163
}
164164
// ...and add the new kids back
165165
for (String name : names) {
166-
// PNode newbie = new PNodeXML("uses-permission");
167-
// newbie.setString("android:name", PERMISSION_PREFIX + name);
168-
// xml.addChild(newbie);
166+
// Don't add required permissions for wallpapers, watchfaces and cardboard again.
167+
if (appComp == AndroidBuild.WALLPAPER) {
168+
} else if (appComp == AndroidBuild.WATCHFACE) {
169+
if (name.equals("android.permission.WAKE_LOCK")) continue;
170+
} else if (appComp == AndroidBuild.CARDBOARD) {
171+
if (name.equals("android.permission.INTERNET") ||
172+
name.equals("android.permission.NFC") ||
173+
name.equals("android.permission.VIBRATE") ||
174+
name.equals("android.permission.READ_EXTERNAL_STORAGE") ||
175+
name.equals("android.permission.WRITE_EXTERNAL_STORAGE")) continue;
176+
}
169177
XML newbie = xml.addChild("uses-permission");
170178
newbie.setString("android:name", PERMISSION_PREFIX + name);
171179
}

0 commit comments

Comments
 (0)