Home | History | Annotate | Download | only in server

Lines Matching defs:shell

2494     static class Shell extends ShellCommand {
2509 Shell(IAppOpsService iface, AppOpsService internal) {
2688 (new Shell(this, this)).exec(this, in, out, err, args, callback, resultReceiver);
2719 static int onShellCommand(Shell shell, String cmd) {
2721 return shell.handleDefaultCommands(cmd);
2723 PrintWriter pw = shell.getOutPrintWriter();
2724 PrintWriter err = shell.getErrPrintWriter();
2728 int res = shell.parseUserPackageOp(true, err);
2732 String modeStr = shell.getNextArg();
2738 final int mode = shell.strModeToMode(modeStr, err);
2743 if (shell.packageName != null) {
2744 shell.mInterface.setMode(shell.op, shell.packageUid, shell.packageName,
2747 shell.mInterface.setUidMode(shell.op, shell.nonpackageUid, mode);
2752 int res = shell.parseUserPackageOp(false, err);
2758 if (shell.packageName != null) {
2759 ops = shell.mInterface.getOpsForPackage(
2760 shell.packageUid, shell.packageName,
2761 shell.op != AppOpsManager.OP_NONE ? new int[]{shell.op} : null);
2763 ops = shell.mInterface.getUidOps(
2764 shell.nonpackageUid,
2765 shell.op != AppOpsManager.OP_NONE ? new int[]{shell.op} : null);
2769 if (shell.op > AppOpsManager.OP_NONE && shell.op < AppOpsManager._NUM_OP) {
2771 AppOpsManager.opToDefaultMode(shell.op)));
2805 int res = shell.parseUserOpMode(AppOpsManager.MODE_IGNORED, err);
2809 List<AppOpsManager.PackageOps> ops = shell.mInterface.getPackagesForOps(
2810 new int[] {shell.op});
2821 if (ent.getOp() == shell.op && ent.getMode() == shell.mode) {
2835 for (String argument; (argument = shell.getNextArg()) != null;) {
2837 String userStr = shell.getNextArgRequired();
2853 shell.mInterface.resetAllModes(userId, packageName);
2869 shell.mInternal.enforceManageAppOpsModes(Binder.getCallingPid(),
2873 synchronized (shell.mInternal) {
2874 shell.mInternal.mHandler.removeCallbacks(shell.mInternal.mWriteRunner);
2876 shell.mInternal.writeState();
2884 shell.mInternal.enforceManageAppOpsModes(Binder.getCallingPid(),
2888 shell.mInternal.readState();
2896 int res = shell.parseUserPackageOp(true, err);
2901 if (shell.packageName != null) {
2902 shell.mInterface.startOperation(shell.mToken,
2903 shell.op, shell.packageUid, shell.packageName, true);
2910 int res = shell.parseUserPackageOp(true, err);
2915 if (shell.packageName != null) {
2916 shell.mInterface.finishOperation(shell.mToken,
2917 shell.op, shell.packageUid, shell.packageName);
2924 return shell.handleDefaultCommands(cmd);
2995 dumpOp = Shell.strOpToOp(args[i], pw);
3023 dumpMode = Shell.strModeToMode(args[i], pw);
3573 return "com.android.shell";
3593 case "shell":