/cts/suite/audio_quality/lib/src/ |
D | Adb.cpp | 34 android::String8 command; in setPortForwarding() local 35 if (command.appendFormat("forward tcp:%d tcp:%d", hostPort, devicePort) != 0) { in setPortForwarding() 38 if (executeCommand(command) != 0) { in setPortForwarding() 46 android::String8 command; in launchClient() local 47 if (command.appendFormat("install -r %s", clientBinary.string()) != 0) { in launchClient() 50 if (executeCommand(command) != 0) { in launchClient() 53 command.clear(); in launchClient() 54 if (command.appendFormat("shell am start -W -n %s", component.string()) != 0) { in launchClient() 57 if (executeCommand(command) != 0) { in launchClient() 64 int Adb::executeCommand(const android::String8& command) in executeCommand() argument [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/devicepolicy/src/com/android/cts/devicepolicy/ |
D | BaseDevicePolicyTest.java | 253 protected void waitForOutput(String message, String command, Predicate<String> predicate, in waitForOutput() argument 256 while (!predicate.test(getDevice().executeShellCommand(command))) { in waitForOutput() 312 protected void executeShellCommand(final String command) throws Exception { in executeShellCommand() argument 313 CLog.d("Starting command " + command); in executeShellCommand() 314 String commandOutput = getDevice().executeShellCommand(command); in executeShellCommand() 315 CLog.d("Output for command " + command + ": " + commandOutput); in executeShellCommand() 367 String command = "pm list users"; in getUserFlags() local 368 String commandOutput = getDevice().executeShellCommand(command); in getUserFlags() 369 CLog.i("Output for command " + command + ": " + commandOutput); in getUserFlags() 586 String command ="pm create-user " + (guest ? "--guest " : "") in createUser() local [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | AudioSecurityTest.java | 150 byte command[] = new byte[8]; in testAudioEffectGetParameter() 151 Arrays.fill(command, (byte)1); in testAudioEffectGetParameter() 156 audioEffect, EFFECT_CMD_OFFLOAD, command, reply); in testAudioEffectGetParameter() 161 byte command[] = new byte[30]; in testAudioEffectGetParameter() 162 Arrays.fill(command, (byte)0xDD); in testAudioEffectGetParameter() 167 audioEffect, EFFECT_CMD_GET_PARAM, command, reply); in testAudioEffectGetParameter() 193 byte command[] = new byte[8]; in testAudioEffectGetParameter2() 194 Arrays.fill(command, (byte)1); in testAudioEffectGetParameter2() 199 audioEffect, EFFECT_CMD_OFFLOAD, command, reply); in testAudioEffectGetParameter2() 206 byte command[] = ByteBuffer.allocate(5 * 4 /* capacity */) in testAudioEffectGetParameter2() [all …]
|
D | EffectBundleTest.java | 126 final int command = Equalizer.PARAM_GET_PRESET_NAME; in testParamPresetName() local 132 if (!eqGetParam(media, command, invalidBand, reply)) { in testParamPresetName() 163 final int command = Equalizer.PARAM_BAND_LEVEL; in testEqualizer_setParamBandLevel() local 167 if (!eqSetParam(MEDIA_SHORT, command, invalidBand, value)) { in testEqualizer_setParamBandLevel() 179 final int command = Equalizer.PARAM_BAND_LEVEL; in testEqualizer_setParamBandLevel_long() local 183 if (!eqSetParam(MEDIA_LONG, command, invalidBand, value)) { in testEqualizer_setParamBandLevel_long() 286 byte command[] = concatArrays(/*status*/ intToByteArray(0), in eqSetParamProperties() 296 byte[].class).invoke(af, cmdCode, command, reply); in eqSetParamProperties() 329 byte command[] = concatArrays(/*status*/ intToByteArray(0), in eqGetParamFreqRangeCommand() 335 byte reply[] = new byte[command.length]; in eqGetParamFreqRangeCommand() [all …]
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | MockIme.java | 137 private void onReceiveCommand(@NonNull ImeCommand command) { in onReceiveCommand() argument 138 getTracer().onReceiveCommand(command, () -> { in onReceiveCommand() 139 if (command.shouldDispatchToMainThread()) { in onReceiveCommand() 140 mMainHandler.post(() -> onHandleCommand(command)); in onReceiveCommand() 142 onHandleCommand(command); in onReceiveCommand() 148 private void onHandleCommand(@NonNull ImeCommand command) { in onHandleCommand() argument 149 getTracer().onHandleCommand(command, () -> { in onHandleCommand() 150 if (command.shouldDispatchToMainThread()) { in onHandleCommand() 152 throw new IllegalStateException("command " + command in onHandleCommand() 155 switch (command.getName()) { in onHandleCommand() [all …]
|
/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 | 68 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 69 Log.i(TAG, "Command: " + command); in handleIntent() 71 if (COMMAND_ADD_USER_RESTRICTION.equals(command)) { in handleIntent() 76 } else if (COMMAND_CLEAR_USER_RESTRICTION.equals(command)) { in handleIntent() 82 } else if (COMMAND_BLOCK_ACCOUNT_TYPE.equals(command)) { in handleIntent() 88 } else if (COMMAND_UNBLOCK_ACCOUNT_TYPE.equals(command)) { in handleIntent() 94 } else if (COMMAND_SET_APP_RESTRICTIONS_MANAGER.equals(command)) { in handleIntent() 103 } else if (COMMAND_SET_DELEGATED_SCOPES.equals(command)) { in handleIntent() 112 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/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/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/backup/src/android/backup/cts/ |
D | BaseBackupCtsTest.java | 43 protected InputStream executeShellCommand(String command) { 44 return executeInstrumentationShellCommand(getInstrumentation(), command); 50 protected InputStream executeShellCommand(String command) { 51 return executeInstrumentationShellCommand(getInstrumentation(), command); 103 Instrumentation instrumentation, String command) { in executeInstrumentationShellCommand() argument 105 instrumentation.getUiAutomation().executeShellCommand(command); in executeInstrumentationShellCommand()
|
/cts/tests/app/app/src/android/app/stubs/ |
D | CommandReceiver.java | 81 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onReceive() local 82 Log.d(TAG + "_" + context.getPackageName(), "Got command " + command + ", intent=" in onReceive() 84 switch (command) { in onReceive() 151 int command = LocalForegroundService.COMMAND_START_FOREGROUND; in doStartForegroundService() local 152 fgsIntent.putExtras(LocalForegroundService.newCommand(new Binder(), command)); in doStartForegroundService() 161 int command = LocalForegroundServiceLocation.COMMAND_START_FOREGROUND_WITH_TYPE; in doStartForegroundServiceWithType() local 162 fgsIntent.putExtras(LocalForegroundService.newCommand(new Binder(), command)); in doStartForegroundServiceWithType() 211 int command = LocalForegroundServiceLocation.COMMAND_START_FOREGROUND_WITH_TYPE; in doCreateFgslPendingIntent() local 212 intent.putExtras(LocalForegroundService.newCommand(new Binder(), command)); in doCreateFgslPendingIntent() 235 public static void sendCommand(Context context, int command, String sourcePackage, in sendCommand() argument [all …]
|
D | LocalForegroundService.java | 68 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onStart() local 70 Log.d(TAG, "service start cmd " + command + ", intent " + intent); in onStart() 72 switch (command) { in onStart() 103 Log.e(TAG, "Unknown command: " + command); in onStart() 120 public static Bundle newCommand(IBinder stateReceiver, int command) { in newCommand() argument 123 bundle.putInt(EXTRA_COMMAND, command); in newCommand()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | SetPolicyActivity.java | 56 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 57 Log.i(TAG, "Command: \"" + command); in handleIntent() 59 if (ADD_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 64 } else if (CLEAR_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 70 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/ |
D | CommandSession.java | 251 public void sendCommand(String command) { 252 sendCommand(command, null /* data */); 256 public void sendCommand(String command, Bundle data) { 265 intent.putExtra(KEY_COMMAND, command); 273 public Bundle sendCommandAndWaitReply(String command) { 274 return sendCommandAndWaitReply(command, null /* data */); 278 public Bundle sendCommandAndWaitReply(String command, Bundle data) { 288 mPendingCommand = command; 291 sendCommand(command, data); 535 void receiveCommand(String command, Bundle data); [all …]
|
/cts/tests/tests/notificationlegacy/notificationlegacy20/src/android/app/notification/legacy20/cts/ |
D | LegacyNotificationManager20Test.java | 147 String command = " cmd notification " + (on ? "allow_dnd " : "disallow_dnd ") + packageName; in toggleNotificationPolicyAccess() local 149 runCommand(command, instrumentation); in toggleNotificationPolicyAccess() 159 String command = " cmd package " + (suspend ? "suspend " in suspendPackage() local 162 runCommand(command, instrumentation); in suspendPackage() 168 String command = " cmd notification " + (on ? "allow_listener " : "disallow_listener ") in toggleListenerAccess() local 171 runCommand(command, instrumentation); in toggleListenerAccess() 179 private void runCommand(String command, Instrumentation instrumentation) throws IOException { in runCommand() argument 182 try (ParcelFileDescriptor fd = uiAutomation.executeShellCommand(command)) { in runCommand() 183 Assert.assertNotNull("Failed to execute shell command: " + command, fd); in runCommand() 189 throw new IOException("Could not read stdout of command: " + command, e); in runCommand()
|
/cts/hostsidetests/incident/src/com/android/server/cts/ |
D | ProtoDumpTestCase.java | 99 public <T extends MessageLite> T getDump(Parser<T> parser, String command) throws Exception { in getDump() argument 101 getDevice().executeShellCommand(command, receiver); in getDump() 173 protected String execCommandAndGet(String command) throws Exception { in execCommandAndGet() argument 175 getDevice().executeShellCommand(command, receiver); in execCommandAndGet() 183 protected Matcher execCommandAndFind(String command, String pattern, int patternFlags) in execCommandAndFind() argument 185 final String output = execCommandAndGet(command); in execCommandAndFind() 195 protected Matcher execCommandAndFind(String command, String pattern) throws Exception { in execCommandAndFind() argument 196 return execCommandAndFind(command, pattern, 0); in execCommandAndFind() 203 protected String execCommandAndGetFirstGroup(String command, String pattern) throws Exception { in execCommandAndGetFirstGroup() argument 204 final Matcher matcher = execCommandAndFind(command, pattern); in execCommandAndGetFirstGroup()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | InputConnectionBlockingMethodTest.java | 266 final ImeCommand command = session.callGetTextAfterCursor(expectedN, expectedFlags); in testGetTextAfterCursor() 268 expectCommand(stream, command, TIMEOUT).getReturnCharSequenceValue(); in testGetTextAfterCursor() 295 final ImeCommand command = session.callGetTextAfterCursor( in testGetTextAfterCursorFailWithTimeout() 298 final ImeEvent result = expectCommand(stream, command, LONG_TIMEOUT); in testGetTextAfterCursorFailWithTimeout() 368 final ImeCommand command = session.callGetTextBeforeCursor(expectedN, expectedFlags); in testGetTextBeforeCursor() 370 expectCommand(stream, command, TIMEOUT).getReturnCharSequenceValue(); in testGetTextBeforeCursor() 397 final ImeCommand command = session.callGetTextBeforeCursor( in testGetTextBeforeCursorFailWithTimeout() 400 final ImeEvent result = expectCommand(stream, command, LONG_TIMEOUT); in testGetTextBeforeCursorFailWithTimeout() 469 final ImeCommand command = session.callGetSelectedText(expectedFlags); in testGetSelectedText() 471 expectCommand(stream, command, TIMEOUT).getReturnCharSequenceValue(); in testGetSelectedText() [all …]
|
/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/tests/app/src/android/app/cts/ |
D | BaseTileServiceTest.java | 103 String command = " cmd statusbar " + (on ? "add-tile " : "remove-tile ") in toggleServiceAccess() local 106 executeShellCommand(command); in toggleServiceAccess() 109 public String executeShellCommand(String command) throws IOException { in executeShellCommand() argument 110 Log.i(getTag(), "Shell command: " + command); in executeShellCommand() local 112 return SystemUtil.runShellCommand(getInstrumentation(), command); in executeShellCommand() 115 Log.e(getTag(), "Error running shell command: " + command); in executeShellCommand()
|
/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()
|
/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/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()
|