Skip to content

Commit 3f8f5e4

Browse files
committed
Update Kill.apk
1 parent 3445df1 commit 3f8f5e4

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

Kill.apk

172 Bytes
Binary file not shown.

sample/src/main/java/com/xdandroid/sample/misc/GenOpsActivity.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,7 @@
1717
public class GenOpsActivity extends Activity {
1818

1919
static String genOp(String pkg, String op) {
20-
String mode;
21-
switch (op) {
22-
case "RUN_IN_BACKGROUND":
23-
mode = WHITE_LIST_APPS.contains(pkg) ? "allow" : "ignore";
24-
break;
25-
default:
26-
mode = "ignore";
27-
break;
28-
}
29-
return "adb shell cmd appops set " + pkg + " " + op + " " + mode + "\n\n";
20+
return "adb shell cmd appops set " + pkg + " " + op + " " + ("RUN_IN_BACKGROUND".equals(op) && WHITE_LIST_APPS.contains(pkg) ? "allow" : "ignore") + "\n\n";
3021
}
3122

3223
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)