/cts/tests/tests/time/shell_utils/common/android/app/time/cts/shell/ |
D | DeviceShellCommandExecutor.java | 28 public final String executeToString(@NonNull String command) throws Exception { in executeToString() argument 29 byte[] bytes = executeToBytesInternal(command); in executeToString() 31 log("Executed '" + command + "': Result='" + result + "'"); in executeToString() 37 public final String executeToTrimmedString(@NonNull String command) throws Exception { in executeToTrimmedString() argument 38 byte[] bytes = executeToBytesInternal(command); in executeToTrimmedString() 40 log("Executed '" + command + "': Result='" + result + "'"); in executeToTrimmedString() 49 public final boolean executeToBoolean(@NonNull String command) throws Exception { in executeToBoolean() argument 50 byte[] bytes = executeToBytesInternal(command); in executeToBoolean() 52 log("Executed '" + command + "': Result='" + result + "'"); in executeToBoolean() 58 public final byte[] executeToBytes(@NonNull String command) throws Exception { in executeToBytes() argument [all …]
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/ |
D | ShellCommandUtils.java | 77 static String executeCommand(String command) throws AdbException { in executeCommand() argument 78 return executeCommand(command, /* allowEmptyOutput=*/ false, /* stdInBytes= */ null); in executeCommand() 81 static String executeCommand(String command, boolean allowEmptyOutput, byte[] stdInBytes) in executeCommand() argument 83 logCommand(command, allowEmptyOutput, stdInBytes); in executeCommand() 86 return executeCommandPreS(command, allowEmptyOutput, stdInBytes); in executeCommand() 92 ParcelFileDescriptor[] fds = uiAutomation().executeShellCommandRwe(command); in executeCommand() 103 throw new AdbException("Error executing command", command, out, err); in executeCommand() 112 throw new AdbException("Error executing command", command, e); in executeCommand() 116 static byte[] executeCommandForBytes(String command) throws AdbException { in executeCommandForBytes() argument 117 return executeCommandForBytes(command, /* stdInBytes= */ null); in executeCommandForBytes() [all …]
|
D | ShellCommand.java | 41 public static Builder builder(String command) { in builder() argument 42 if (command == null) { in builder() 45 return new Builder(command); in builder() 52 public static Builder builderForUser(@Nullable UserReference userReference, String command) { in builderForUser() argument 53 Builder builder = builder(command); in builderForUser() 71 private Builder(String command) { in Builder() argument 72 commandBuilder = new StringBuilder(command); in Builder()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/exceptions/ |
D | AdbException.java | 30 public AdbException(String message, String command, String output) { in AdbException() argument 31 this(message, command, output, /* err= */ (String) null); in AdbException() 34 public AdbException(String message, String command, String output, String err) { in AdbException() argument 36 if (command == null) { in AdbException() 39 this.mCommand = command; in AdbException() 44 public AdbException(String message, String command, Throwable cause) { in AdbException() argument 45 this(message, command, /* output= */ null, cause); in AdbException() 48 public AdbException(String message, String command, String output, Throwable cause) { in AdbException() argument 50 if (command == null) { in AdbException() 53 this.mCommand = command; in AdbException() [all …]
|
/cts/tests/accessibility/common/src/android/accessibility/cts/common/ |
D | ShellCommandBuilder.java | 64 for (Runnable command : mCommands) { in run() 65 command.run(); in run() 86 public ShellCommandBuilder addCommand(String command) { in addCommand() argument 88 execShellCommand(mUiAutomation, command); in addCommand() 93 public ShellCommandBuilder addCommandPrintOnLogCat(String command) { in addCommandPrintOnLogCat() argument 95 execShellCommandAndPrintOnLogcat(mUiAutomation, command); in addCommandPrintOnLogCat() 100 public static void execShellCommandAndPrintOnLogcat(UiAutomation automation, String command) { in execShellCommandAndPrintOnLogcat() argument 101 Log.i(LOG_TAG, "command [" + command + "]"); in execShellCommandAndPrintOnLogcat() 103 final String output = SystemUtil.runShellCommand(automation, command); in execShellCommandAndPrintOnLogcat() 108 throw new RuntimeException("Failed to exec shell command [" + command + "]", e); in execShellCommandAndPrintOnLogcat() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0069/ |
D | poc.c | 81 instructions[command.buffer_size / 8] = (x); \ 82 command.buffer_size += 8; 88 struct cmdqCommandStruct command; in work_out_ioctl_code() local 91 memset(&command, 0, sizeof(command)); in work_out_ioctl_code() 93 command.buffer = (uint64_t)&instructions; in work_out_ioctl_code() 104 ioctl(fd, CMDQ_IOCTL_EXEC_COMMAND | (ii << 16), &command); in work_out_ioctl_code() 122 struct cmdqCommandStruct command; in perform_pa_read() local 140 memset(&command, 0, sizeof(command)); in perform_pa_read() 141 command.buffer = (uint64_t)instructions; in perform_pa_read() 142 command.read_address.count = size; in perform_pa_read() [all …]
|
/cts/suite/audio_quality/lib/src/audio/ |
D | AudioProtocol.cpp | 58 uint32_t command = ntohl(data[0]); in handleReplyHeader() local 59 if ((command & 0xffff0000) != 0x43210000) { in handleReplyHeader() 60 LOGE("Wrong header %x %x", command, data[0]); in handleReplyHeader() 63 command = (command & 0xffff) | 0x12340000; // convert to id in handleReplyHeader() 64 if (command < ECmdStart) { in handleReplyHeader() 65 LOGE("Wrong header %x %x", command, data[0]); in handleReplyHeader() 68 if (command > (ECmdLast - 1)) { in handleReplyHeader() 69 LOGE("Wrong header %x %x", command, data[0]); in handleReplyHeader() 72 id = (CommandId)command; in handleReplyHeader() 73 LOGD("received reply with command %x", command); in handleReplyHeader() [all …]
|
/cts/hostsidetests/packagemanager/multiuser/src/com/android/tests/packagemanager/multiuser/host/ |
D | PackageManagerMultiUserTestBase.java | 95 String command = "pm create-user TestUser_" + System.currentTimeMillis(); in createUser() local 96 LogUtil.CLog.d("Starting command " + command); in createUser() 97 String commandOutput = getDevice().executeShellCommand(command); in createUser() 98 LogUtil.CLog.d("Output for command " + command + ": " + commandOutput); in createUser() 116 String command = "pm remove-user " + userId; in removeUser() local 117 LogUtil.CLog.d("Starting command " + command); in removeUser() 118 String commandOutput = getDevice().executeShellCommand(command); in removeUser() 119 LogUtil.CLog.d("Output for command " + command + ": " + commandOutput); in removeUser() 123 String command = "pm install-existing --user " + userId + " " + pkgName; in installExistingPackageForUser() local 124 LogUtil.CLog.d("Starting command " + command); in installExistingPackageForUser() [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | AudioSecurityTest.java | 149 byte command[] = new byte[8]; in testAudioEffectGetParameter() 150 Arrays.fill(command, (byte)1); in testAudioEffectGetParameter() 155 audioEffect, EFFECT_CMD_OFFLOAD, command, reply); in testAudioEffectGetParameter() 160 byte command[] = new byte[30]; in testAudioEffectGetParameter() 161 Arrays.fill(command, (byte)0xDD); in testAudioEffectGetParameter() 166 audioEffect, EFFECT_CMD_GET_PARAM, command, reply); in testAudioEffectGetParameter() 192 byte command[] = new byte[8]; in testAudioEffectGetParameter2() 193 Arrays.fill(command, (byte)1); in testAudioEffectGetParameter2() 198 audioEffect, EFFECT_CMD_OFFLOAD, command, reply); in testAudioEffectGetParameter2() 205 byte command[] = ByteBuffer.allocate(5 * 4 /* capacity */) in testAudioEffectGetParameter2() [all …]
|
D | EffectBundleTest.java | 125 final int command = Equalizer.PARAM_GET_PRESET_NAME; in testParamPresetName() local 131 if (!eqGetParam(media, command, invalidBand, reply)) { in testParamPresetName() 162 final int command = Equalizer.PARAM_BAND_LEVEL; in testEqualizer_setParamBandLevel() local 166 if (!eqSetParam(MEDIA_SHORT, command, invalidBand, value)) { in testEqualizer_setParamBandLevel() 178 final int command = Equalizer.PARAM_BAND_LEVEL; in testEqualizer_setParamBandLevel_long() local 182 if (!eqSetParam(MEDIA_LONG, command, invalidBand, value)) { in testEqualizer_setParamBandLevel_long() 285 byte command[] = concatArrays(/*status*/ intToByteArray(0), in eqSetParamProperties() 295 byte[].class).invoke(af, cmdCode, command, reply); in eqSetParamProperties() 328 byte command[] = concatArrays(/*status*/ intToByteArray(0), in eqGetParamFreqRangeCommand() 334 byte reply[] = new byte[command.length]; in eqGetParamFreqRangeCommand() [all …]
|
/cts/tests/tests/telephony2/src/android/telephony2/cts/ |
D | PhoneNumberTest.java | 39 StringBuilder command = new StringBuilder(); in setDefaultSmsApp() local 40 command.append("appops set "); in setDefaultSmsApp() 41 command.append(getInstrumentation().getContext().getPackageName()); in setDefaultSmsApp() 42 command.append(" WRITE_SMS "); in setDefaultSmsApp() 43 command.append(setToSmsApp ? "allow" : "default"); in setDefaultSmsApp() 46 .executeShellCommand(command.toString()); in setDefaultSmsApp()
|
/cts/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/ |
D | BaseShortcutManagerHostTest.java | 91 protected String executeShellCommandWithLog(String command) throws DeviceNotAvailableException { in executeShellCommandWithLog() argument 92 CLog.i("Executing command: " + command); in executeShellCommandWithLog() 93 final String output = getDevice().executeShellCommand(command); in executeShellCommandWithLog() 174 final String command = "pm create-user --profileOf " + parentUserId in createProfile() local 176 CLog.d("Starting command: " + command); in createProfile() 177 final String output = getDevice().executeShellCommand(command); in createProfile() 178 CLog.d("Output for command " + command + ": " + output); in createProfile() 262 private String runCommand(String command) throws Exception { in runCommand() argument 263 return runCommand(command, "", true); in runCommand() 266 private String runCommand(String command, String expectedOutputPattern) throws Exception { in runCommand() argument [all …]
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | SetPolicyActivity.java | 58 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 59 Log.i(TAG, "Command: \"" + command); in handleIntent() 61 if (ADD_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 66 } else if (CLEAR_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 72 } else if (ADD_CROSS_PROFILE_WIDGET_COMMAND.equals(command)) { in handleIntent() 78 } else if (REMOVE_CROSS_PROFILE_WIDGET_COMMAND.equals(command)) { in handleIntent() 85 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | Session2CommandTest.java | 49 Session2Command command = new Session2Command(Session2Command.COMMAND_CODE_CUSTOM); in testConstructorWithCommandCodeCustom() local 59 Session2Command command = new Session2Command(null, null); in testConstructorWithNullAction() local 99 Session2Command command = new Session2Command(TEST_COMMAND_CODE); in testDescribeContents() local 100 assertEquals(expected, command.describeContents()); in testDescribeContents() 105 Session2Command command = new Session2Command(TEST_CUSTOM_ACTION, null); in testWriteToParcel() local 107 command.writeToParcel(dest, 0); in testWriteToParcel() 109 assertEquals(command.getCommandCode(), dest.readInt()); in testWriteToParcel() 110 assertEquals(command.getCustomAction(), dest.readString()); in testWriteToParcel() 111 assertEquals(command.getCustomExtras(), dest.readBundle()); in testWriteToParcel()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | SetPolicyActivity.java | 72 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 73 Log.i(TAG, "Command: " + command + " UID: " + Process.myUid() + " DPM: " + dpm); in handleIntent() 75 if (COMMAND_ADD_USER_RESTRICTION.equals(command)) { in handleIntent() 80 } else if (COMMAND_CLEAR_USER_RESTRICTION.equals(command)) { in handleIntent() 86 } else if (COMMAND_BLOCK_ACCOUNT_TYPE.equals(command)) { in handleIntent() 92 } else if (COMMAND_UNBLOCK_ACCOUNT_TYPE.equals(command)) { in handleIntent() 98 } else if (COMMAND_SET_APP_RESTRICTIONS_MANAGER.equals(command)) { in handleIntent() 107 } else if (COMMAND_SET_DELEGATED_SCOPES.equals(command)) { in handleIntent() 116 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | BaseDevicePolicyTest.java | 286 protected void waitForOutput(String message, String command, Predicate<String> predicate, in waitForOutput() argument 289 while (!predicate.test(getDevice().executeShellCommand(command))) { in waitForOutput() 388 protected String executeShellCommand(String command) throws Exception { in executeShellCommand() argument 389 CLog.d("Starting command %s", command); in executeShellCommand() 390 String commandOutput = getDevice().executeShellCommand(command); in executeShellCommand() 391 CLog.d("Output for command %s: %s", command, commandOutput); in executeShellCommand() 447 String command = "pm list users"; in getUserFlags() local 448 String commandOutput = getDevice().executeShellCommand(command); in getUserFlags() 449 CLog.i("Output for command " + command + ": " + commandOutput); in getUserFlags() 689 String command ="pm create-user " + (guest ? "--guest " : "") in createUser() local [all …]
|
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/testcore/ |
D | VoiceInteractionSessionControl.java | 87 final Bundle command = new Bundle(); in executeCommand() local 88 command.putString(Utils.VOICE_INTERACTION_KEY_COMMAND, action); in executeCommand() 89 command.putParcelable(Utils.VOICE_INTERACTION_DIRECT_ACTIONS_KEY_ACTION, directAction); in executeCommand() 90 command.putBundle(Utils.VOICE_INTERACTION_KEY_ARGUMENTS, arguments); in executeCommand() 91 command.putParcelable(Utils.VOICE_INTERACTION_KEY_CALLBACK, callback); in executeCommand() 94 + Utils.toBundleString(command)); in executeCommand() 95 mControl.sendResult(command); in executeCommand()
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | MockIme.java | 152 private void onReceiveCommand(@NonNull ImeCommand command) { in onReceiveCommand() argument 153 getTracer().onReceiveCommand(command, () -> { in onReceiveCommand() 154 if (command.shouldDispatchToMainThread()) { in onReceiveCommand() 155 mMainHandler.post(() -> onHandleCommand(command)); in onReceiveCommand() 157 onHandleCommand(command); in onReceiveCommand() 163 private void onHandleCommand(@NonNull ImeCommand command) { in onHandleCommand() argument 164 getTracer().onHandleCommand(command, () -> { in onHandleCommand() 165 if (command.shouldDispatchToMainThread()) { in onHandleCommand() 167 throw new IllegalStateException("command " + command in onHandleCommand() 180 switch (command.getName()) { in onHandleCommand() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | SetPolicyActivity.java | 57 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 58 Log.i(TAG, "Command: \"" + command + " DPM: " + dpm); in handleIntent() 60 if (ADD_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 65 } else if (CLEAR_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 71 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/tests/app/app/src/android/app/stubs/ |
D | CommandReceiver.java | 106 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onReceive() local 107 Log.d(TAG + "_" + context.getPackageName(), "Got command " + command + ", intent=" in onReceive() 109 switch (command) { in onReceive() 198 int command = LocalForegroundService.COMMAND_START_FOREGROUND; in doStartForegroundService() local 199 fgsIntent.putExtras(LocalForegroundService.newCommand(command)); in doStartForegroundService() 221 int command = LocalForegroundServiceLocation.COMMAND_START_FOREGROUND_WITH_TYPE; in doStartForegroundServiceWithType() local 222 fgsIntent.putExtras(LocalForegroundService.newCommand(command)); in doStartForegroundServiceWithType() 236 int command = LocalForegroundService.COMMAND_START_FOREGROUND; in doStartForegroundServiceSticky() local 237 fgsIntent.putExtras(LocalForegroundService.newCommand(command)); in doStartForegroundServiceSticky() 293 int command = LocalForegroundServiceLocation.COMMAND_START_FOREGROUND_WITH_TYPE; in doCreateFgslPendingIntent() local [all …]
|
D | LocalForegroundService.java | 82 final int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onStartCommand() local 84 Log.d(getTag(), "service start cmd " + command + ", intent " + intent); in onStartCommand() 86 switch (command) { in onStartCommand() 91 final boolean showNow = (command == COMMAND_START_FOREGROUND); in onStartCommand() 129 Log.e(getTag(), "Unknown command: " + command); in onStartCommand() local 147 public static Bundle newCommand(IBinder stateReceiver, int command) { in newCommand() argument 150 bundle.putInt(EXTRA_COMMAND, command); in newCommand() 154 public static Bundle newCommand(int command) { in newCommand() argument 157 bundle.putInt(EXTRA_COMMAND, command); in newCommand()
|
/cts/hostsidetests/securitybulletin/src/android/security/cts/ |
D | LaunchSomeWhere.java | 78 String command = "am start"; in launchSomeWhere() local 86 command += " " + s; in launchSomeWhere() 89 AdbUtils.runCommandLine(command, device); in launchSomeWhere()
|
/cts/tools/utils/ |
D | rerun.py | 81 command = ctsPath + "/tools/cts-tradefed run singleCommand cts" 83 command += " --serial " + deviceSerial 84 command += " --class " + className + " --method " + methodName 85 print command 86 os.system(command)
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | ShellUtils.java | 40 final String command = String.format(template, args); in runShellCommand() local 41 Log.d(TAG, "runShellCommand(): " + command); in runShellCommand() 44 .runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runShellCommand() 47 throw new RuntimeException("Command '" + command + "' failed: ", e); in runShellCommand()
|
/cts/suite/audio_quality/lib/include/audio/ |
D | RemoteAudio.h | 76 void sendCommand(android::sp<android::MessageHandler>& command); 79 bool waitForCompletion(android::sp<android::MessageHandler>& command, int timeInMSec); 86 CommandHandler* toCommandHandler(android::sp<android::MessageHandler>& command) { in toCommandHandler() argument 87 return reinterpret_cast<CommandHandler*>(command.get()); in toCommandHandler() 114 CommandHandler(RemoteAudio& thread, int command) in CommandHandler() argument 116 mMessage(command), in CommandHandler()
|