summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authoramtlib-dot-dll <amtlib-dot-dll@users.noreply.github.com>2016-10-14 11:11:45 +0800
committerMichael Bestas <mikeioannina@cyanogenmod.org>2016-12-03 07:36:12 -0800
commit948bde8da2047f5ea4dad51ca2131af95e13649f (patch)
treead225cbdea967c1c7904b60cd1b999633e4f3847 /cmds
parent2905e604a691cf8d04b9014f74b41d0f7d6079e4 (diff)
downloadframeworks_base-948bde8da2047f5ea4dad51ca2131af95e13649f.zip
frameworks_base-948bde8da2047f5ea4dad51ca2131af95e13649f.tar.gz
frameworks_base-948bde8da2047f5ea4dad51ca2131af95e13649f.tar.bz2
Support for MODE_ASK in commandline
Change-Id: Idaf46295aff58259c786de4a4fef9c475c363cff
Diffstat (limited to 'cmds')
-rw-r--r--cmds/appops/src/com/android/commands/appops/AppOpsCommand.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmds/appops/src/com/android/commands/appops/AppOpsCommand.java b/cmds/appops/src/com/android/commands/appops/AppOpsCommand.java
index 3ec63b4..8dffe47 100644
--- a/cmds/appops/src/com/android/commands/appops/AppOpsCommand.java
+++ b/cmds/appops/src/com/android/commands/appops/AppOpsCommand.java
@@ -47,7 +47,7 @@ public class AppOpsCommand extends BaseCommand {
+ " appops reset [--user <USER_ID>] [<PACKAGE>]\n"
+ " <PACKAGE> an Android package name.\n"
+ " <OP> an AppOps operation.\n"
- + " <MODE> one of allow, ignore, deny, or default\n"
+ + " <MODE> one of allow, ignore, deny, default, or ask\n"
+ " <USER_ID> the user id under which the package is installed. If --user is not\n"
+ " specified, the current user is assumed.\n");
}
@@ -85,6 +85,7 @@ public class AppOpsCommand extends BaseCommand {
private static final String MODE_DENY = "deny";
private static final String MODE_IGNORE = "ignore";
private static final String MODE_DEFAULT = "default";
+ private static final String MODE_ASK = "ask";
private int strOpToOp(String op) {
try {
@@ -154,6 +155,9 @@ public class AppOpsCommand extends BaseCommand {
case MODE_DEFAULT:
modeInt = AppOpsManager.MODE_DEFAULT;
break;
+ case MODE_ASK:
+ modeInt = AppOpsManager.MODE_ASK;
+ break;
default:
System.err.println("Error: Mode " + mode + " is not valid,");
return;
@@ -242,6 +246,9 @@ public class AppOpsCommand extends BaseCommand {
case AppOpsManager.MODE_DEFAULT:
System.out.print("default");
break;
+ case AppOpsManager.MODE_ASK:
+ System.out.print("ask");
+ break;
default:
System.out.print("mode=");
System.out.print(ent.getMode());