Skip to content

Commit d9a39ca

Browse files
committed
add permission prefix
1 parent b73f8c6 commit d9a39ca

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/processing/mode/android/Manifest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ public void setPermissions(String[] names) {
158158
String name = kid.getString("android:name");
159159

160160
// ...except the ones for watch faces and VR apps.
161-
if (appComp == AndroidBuild.WATCHFACE && name.equals("WAKE_LOCK")) {
161+
if (appComp == AndroidBuild.WATCHFACE && name.equals(PERMISSION_PREFIX + "WAKE_LOCK")) {
162162
hasWakeLock = true;
163163
continue;
164164
}
165-
if (appComp == AndroidBuild.VR && name.equals("VIBRATE")) {
165+
if (appComp == AndroidBuild.VR && name.equals(PERMISSION_PREFIX + "VIBRATE")) {
166166
hasVibrate = true;
167167
continue;
168168
}
169-
if (appComp == AndroidBuild.VR && name.equals("READ_EXTERNAL_STORAGE")) {
169+
if (appComp == AndroidBuild.VR && name.equals(PERMISSION_PREFIX + "READ_EXTERNAL_STORAGE")) {
170170
hasReadExtStorage = true;
171171
continue;
172172
}
@@ -219,15 +219,15 @@ private void fixPermissions(XML mf) {
219219
boolean hasReadExtStorage = false;
220220
for (XML kid : mf.getChildren("uses-permission")) {
221221
String name = kid.getString("android:name");
222-
if (appComp == AndroidBuild.WATCHFACE && name.equals("WAKE_LOCK")) {
222+
if (appComp == AndroidBuild.WATCHFACE && name.equals(PERMISSION_PREFIX + "WAKE_LOCK")) {
223223
hasWakeLock = true;
224224
continue;
225225
}
226-
if (appComp == AndroidBuild.VR && name.equals("VIBRATE")) {
226+
if (appComp == AndroidBuild.VR && name.equals(PERMISSION_PREFIX + "VIBRATE")) {
227227
hasVibrate = true;
228228
continue;
229229
}
230-
if (appComp == AndroidBuild.VR && name.equals("READ_EXTERNAL_STORAGE")) {
230+
if (appComp == AndroidBuild.VR && name.equals(PERMISSION_PREFIX + "READ_EXTERNAL_STORAGE")) {
231231
hasReadExtStorage = true;
232232
continue;
233233
}

0 commit comments

Comments
 (0)