Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit aeba21fe authored by amtlib-dot-dll's avatar amtlib-dot-dll Committed by Michael Bestas
Browse files

Support for MODE_ASK in commandline

[mikeioannina]: Rewrite for N

Change-Id: Idaf46295aff58259c786de4a4fef9c475c363cff
parent e608868d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1933,6 +1933,8 @@ public class AppOpsService extends IAppOpsService.Stub {
                    return AppOpsManager.MODE_IGNORED;
                case "default":
                    return AppOpsManager.MODE_DEFAULT;
                case "ask":
                    return AppOpsManager.MODE_ASK;
            }
            try {
                return Integer.parseInt(modeStr);
@@ -2048,7 +2050,7 @@ public class AppOpsService extends IAppOpsService.Stub {
        pw.println("  options:");
        pw.println("    <PACKAGE> an Android package name.");
        pw.println("    <OP>      an AppOps operation.");
        pw.println("    <MODE>    one of allow, ignore, deny, or default");
        pw.println("    <MODE>    one of allow, ignore, deny, default or ask");
        pw.println("    <USER_ID> the user id under which the package is installed. If --user is not");
        pw.println("              specified, the current user is assumed.");
    }
@@ -2113,6 +2115,9 @@ public class AppOpsService extends IAppOpsService.Stub {
                                case AppOpsManager.MODE_DEFAULT:
                                    pw.print("default");
                                    break;
                                case AppOpsManager.MODE_ASK:
                                    pw.print("ask");
                                    break;
                                default:
                                    pw.print("mode=");
                                    pw.print(ent.getMode());