/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 …]
|
D | SimpleScriptExec.cpp | 70 android::String8 command; in runScript() local 71 command.appendFormat("%s %s %s", PYTHON_PATH, script.string(), param.string()); in runScript() 76 if ( !(fpipe = (FILE*)popen(command.string(),"r")) ) { in runScript()
|
/cts/common/device-side/util/src/com/android/compatibility/common/util/ |
D | LocationUtils.java | 29 StringBuilder command = new StringBuilder(); in registerMockLocationProvider() local 30 command.append("appops set "); in registerMockLocationProvider() 31 command.append(instrumentation.getContext().getPackageName()); in registerMockLocationProvider() 32 command.append(" android:mock_location "); in registerMockLocationProvider() 33 command.append(enable ? "allow" : "deny"); in registerMockLocationProvider() 35 SystemUtil.runShellCommand(instrumentation, command.toString()); in registerMockLocationProvider() 37 Log.e(TAG, "Error managing mock location app. Command: " + command, e); in registerMockLocationProvider()
|
D | AppOpsUtils.java | 72 String command = "appops set " + packageName + " " + opStr + " " + modeStr; in setOpMode() local 73 return runCommand(command); in setOpMode() 110 private static String runCommand(String command) throws IOException { in runCommand() argument 111 return SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runCommand()
|
/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/tests/tests/telephony2/src/android/telephony2/cts/ |
D | PhoneNumberTest.java | 34 StringBuilder command = new StringBuilder(); in setDefaultSmsApp() local 35 command.append("appops set "); in setDefaultSmsApp() 36 command.append(getInstrumentation().getContext().getPackageName()); in setDefaultSmsApp() 37 command.append(" WRITE_SMS "); in setDefaultSmsApp() 38 command.append(setToSmsApp ? "allow" : "default"); in setDefaultSmsApp() 41 .executeShellCommand(command.toString()); in setDefaultSmsApp()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | AudioSecurityTest.java | 146 byte command[] = new byte[8]; in testAudioEffectGetParameter() 147 Arrays.fill(command, (byte)1); in testAudioEffectGetParameter() 152 audioEffect, EFFECT_CMD_OFFLOAD, command, reply); in testAudioEffectGetParameter() 157 byte command[] = new byte[30]; in testAudioEffectGetParameter() 158 Arrays.fill(command, (byte)0xDD); in testAudioEffectGetParameter() 163 audioEffect, EFFECT_CMD_GET_PARAM, command, reply); in testAudioEffectGetParameter() 189 byte command[] = new byte[8]; in testAudioEffectGetParameter2() 190 Arrays.fill(command, (byte)1); in testAudioEffectGetParameter2() 195 audioEffect, EFFECT_CMD_OFFLOAD, command, reply); in testAudioEffectGetParameter2() 202 byte command[] = ByteBuffer.allocate(5 * 4 /* capacity */) in testAudioEffectGetParameter2() [all …]
|
D | EffectBundleTest.java | 118 final int command = Equalizer.PARAM_GET_PRESET_NAME; in testParamPresetName() local 124 if (!eqGetParam(media, command, invalidBand, reply)) { in testParamPresetName() 154 final int command = Equalizer.PARAM_BAND_LEVEL; in testEqualizer_setParamBandLevel() local 158 if (!eqSetParam(MEDIA_SHORT, command, invalidBand, value)) { in testEqualizer_setParamBandLevel() 169 final int command = Equalizer.PARAM_BAND_LEVEL; in testEqualizer_setParamBandLevel_long() local 173 if (!eqSetParam(MEDIA_LONG, command, invalidBand, value)) { in testEqualizer_setParamBandLevel_long() 272 byte command[] = concatArrays(/*status*/ intToByteArray(0), in eqSetParamProperties() 282 byte[].class).invoke(af, cmdCode, command, reply); in eqSetParamProperties() 315 byte command[] = concatArrays(/*status*/ intToByteArray(0), in eqGetParamFreqRangeCommand() 321 byte reply[] = new byte[command.length]; in eqGetParamFreqRangeCommand() [all …]
|
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | BaseDevicePolicyTest.java | 193 protected void executeShellCommand(final String command) throws Exception { in executeShellCommand() argument 194 CLog.d("Starting command " + command); in executeShellCommand() 195 String commandOutput = getDevice().executeShellCommand(command); in executeShellCommand() 196 CLog.d("Output for command " + command + ": " + commandOutput); in executeShellCommand() 225 String command = "pm list users"; in getUserFlags() local 226 String commandOutput = getDevice().executeShellCommand(command); in getUserFlags() 227 CLog.i("Output for command " + command + ": " + commandOutput); in getUserFlags() 483 String command = "pm list features"; in hasDeviceFeature() local 484 String commandOutput = getDevice().executeShellCommand(command); in hasDeviceFeature() 485 CLog.i("Output for command " + command + ": " + commandOutput); in hasDeviceFeature() [all …]
|
D | BaseLauncherAppsTest.java | 51 String command = "am startservice --user " + mPrimaryUserId in startCallbackService() local 54 CLog.d("Output for command " + command + ": " + getDevice().executeShellCommand(command)); in startCallbackService()
|
/cts/hostsidetests/multiuser/src/android/host/multiuser/ |
D | BaseMultiUserTest.java | 78 final String command = "pm create-user --profileOf " + userId + " --restricted " in createRestrictedProfile() local 80 CLog.d("Starting command: " + command); in createRestrictedProfile() 81 final String output = getDevice().executeShellCommand(command); in createRestrictedProfile() 82 CLog.d("Output for command " + command + ": " + output); in createRestrictedProfile() 101 final String command = "pm create-user " in createUser() local 103 CLog.d("Starting command: " + command); in createUser() 104 final String output = getDevice().executeShellCommand(command); in createUser() 105 CLog.d("Output for command " + command + ": " + output); in createUser()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | SetPolicyActivity.java | 75 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 76 Log.i(TAG, "Command: " + command); in handleIntent() 78 if (COMMAND_ADD_USER_RESTRICTION.equals(command)) { in handleIntent() 83 } else if (COMMAND_CLEAR_USER_RESTRICTION.equals(command)) { in handleIntent() 89 } else if (COMMAND_BLOCK_ACCOUNT_TYPE.equals(command)) { in handleIntent() 95 } else if (COMMAND_UNBLOCK_ACCOUNT_TYPE.equals(command)) { in handleIntent() 101 } else if (COMMAND_SET_APP_RESTRICTIONS_MANAGER.equals(command)) { in handleIntent() 110 } else if (COMMAND_SET_DELEGATED_SCOPES.equals(command)) { in handleIntent() 119 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | ShellCommandBuilder.java | 48 for (Runnable command : mCommands) { in run() 49 command.run(); in run() 70 public ShellCommandBuilder addCommand(String command) { in addCommand() argument 72 execShellCommand(mUiAutomation, command); in addCommand() 77 public static void execShellCommand(UiAutomation automation, String command) { in execShellCommand() argument 78 try (ParcelFileDescriptor fd = automation.executeShellCommand(command)) { in execShellCommand()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | SetPolicyActivity.java | 68 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 69 Log.i(TAG, "Command: \"" + command); in handleIntent() 71 if (ADD_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 76 } else if (CLEAR_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 82 } else if (ADD_CROSS_PROFILE_WIDGET_COMMAND.equals(command)) { in handleIntent() 88 } else if (REMOVE_CROSS_PROFILE_WIDGET_COMMAND.equals(command)) { in handleIntent() 95 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | SetPolicyActivity.java | 64 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local 65 Log.i(TAG, "Command: \"" + command); in handleIntent() 67 if (ADD_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 72 } else if (CLEAR_RESTRICTION_COMMAND.equals(command)) { in handleIntent() 78 Log.e(TAG, "Invalid command: " + command); in handleIntent()
|
/cts/tests/autofillservice/src/android/autofillservice/cts/common/ |
D | ShellHelper.java | 39 final String command = String.format(template, args); in runShellCommand() local 40 Log.d(TAG, "runShellCommand(): " + command); in runShellCommand() 43 .runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runShellCommand() 46 throw new RuntimeException("Command '" + command + "' failed: ", e); in runShellCommand()
|
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/ |
D | MockImeSession.java | 139 @NonNull UiAutomation uiAutomation, @NonNull String command) throws IOException { in executeShellCommand() argument 142 uiAutomation.executeShellCommand(command))) { in executeShellCommand() 291 final ImeCommand command = new ImeCommand( in callCommitText() local 296 intent.putExtras(command.toBundle()); in callCommitText() 298 return command; in callCommitText() 305 final ImeCommand command = new ImeCommand( in callSetBackDisposition() local 310 intent.putExtras(command.toBundle()); in callSetBackDisposition() 312 return command; in callSetBackDisposition() 319 final ImeCommand command = new ImeCommand( in callRequestHideSelf() local 324 intent.putExtras(command.toBundle()); in callRequestHideSelf() [all …]
|
D | MockIme.java | 110 private void onReceiveCommand(@NonNull ImeCommand command) { in onReceiveCommand() argument 111 getTracer().onReceiveCommand(command, () -> { in onReceiveCommand() 112 if (command.shouldDispatchToMainThread()) { in onReceiveCommand() 113 mMainHandler.post(() -> onHandleCommand(command)); in onReceiveCommand() 115 onHandleCommand(command); in onReceiveCommand() 121 private void onHandleCommand(@NonNull ImeCommand command) { in onHandleCommand() argument 122 getTracer().onHandleCommand(command, () -> { in onHandleCommand() 123 if (command.shouldDispatchToMainThread()) { in onHandleCommand() 125 throw new IllegalStateException("command " + command in onHandleCommand() 128 switch (command.getName()) { in onHandleCommand() [all …]
|
/cts/tests/backup/src/android/backup/cts/ |
D | BaseBackupCtsTest.java | 48 protected InputStream executeShellCommand(String command) throws IOException { 49 return executeStreamedShellCommand(getInstrumentation(), command); 101 protected String exec(String command) throws Exception { in exec() argument 102 try (InputStream in = executeStreamedShellCommand(getInstrumentation(), command)) { in exec() argument 115 Instrumentation instrumentation, String command) throws IOException { in executeStreamedShellCommand() argument 117 instrumentation.getUiAutomation().executeShellCommand(command); in executeStreamedShellCommand()
|
/cts/tests/app/app/src/android/app/stubs/ |
D | LocalForegroundService.java | 61 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in onStart() local 63 Log.d(TAG, "service start cmd " + command + ", intent " + intent); in onStart() 65 switch (command) { in onStart() 96 Log.e(TAG, "Unknown command: " + command); in onStart() 110 public static Bundle newCommand(IBinder stateReceiver, int command) { in newCommand() argument 113 bundle.putInt(EXTRA_COMMAND, command); in newCommand()
|
/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/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/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/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/ime/ |
D | ImeCommandReceiver.java | 67 final String command = intent.getStringExtra(ImeCommandConstants.EXTRA_COMMAND); in onReceive() local 69 Log.d(mIme.getClass().getSimpleName(), "onReceive: command=" + command); in onReceive() local 72 switch (command) { in onReceive() 104 throw new UnsupportedOperationException("Unknown IME command: " + command); in onReceive()
|
/cts/hostsidetests/media/src/android/media/cts/ |
D | BaseMultiUserTest.java | 175 protected @Nonnull String executeShellCommand(final String command) throws Exception { in executeShellCommand() argument 176 CLog.d("Starting command " + command); in executeShellCommand() 177 String commandOutput = getDevice().executeShellCommand(command); in executeShellCommand() 178 CLog.d("Output for command " + command + ": " + commandOutput); in executeShellCommand() 183 String command = "pm create-user" + extraParam + " TestUser_" + System.currentTimeMillis(); in createAndStartUser() local 184 String commandOutput = executeShellCommand(command); in createAndStartUser() 351 String command = "pm list features"; in hasDeviceFeature() local 352 String commandOutput = getDevice().executeShellCommand(command); in hasDeviceFeature() 353 CLog.i("Output for command " + command + ": " + commandOutput); in hasDeviceFeature()
|