Home
last modified time | relevance | path

Searched refs:command (Results 1 – 25 of 52) sorted by relevance

123

/cts/suite/audio_quality/lib/src/
DAdb.cpp34 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 …]
DSimpleScriptExec.cpp70 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/libs/deviceutil/src/android/cts/util/
DLocationUtils.java29 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()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DBaseDevicePolicyTest.java107 String command = "am start-user " + userId; in startUser() local
108 CLog.logAndDisplay(LogLevel.INFO, "Starting command " + command); in startUser()
109 String commandOutput = getDevice().executeShellCommand(command); in startUser()
110 CLog.logAndDisplay(LogLevel.INFO, "Output for command " + command + ": " + commandOutput); in startUser()
117 String command = "pm get-max-users"; in getMaxNumberOfUsersSupported() local
118 String commandOutput = getDevice().executeShellCommand(command); in getMaxNumberOfUsersSupported()
119 CLog.i("Output for command " + command + ": " + commandOutput); in getMaxNumberOfUsersSupported()
130 String command = "pm list users"; in listUsers() local
131 String commandOutput = getDevice().executeShellCommand(command); in listUsers()
132 CLog.i("Output for command " + command + ": " + commandOutput); in listUsers()
[all …]
DManagedProfileTest.java170 String command = "am start -W --user " + mUserId + " " + MANAGED_PROFILE_PKG in testCrossProfileIntentFilters() local
172 CLog.logAndDisplay(LogLevel.INFO, "Output for command " + command + ": " in testCrossProfileIntentFilters()
173 + getDevice().executeShellCommand(command)); in testCrossProfileIntentFilters()
563 String command = "add-restriction"; in testNfcRestriction() local
566 changeUserRestrictionForUser(restriction, command, mUserId); in testNfcRestriction()
619 String command = "am start -W --user " + userId in disableActivityForUser() local
623 CLog.logAndDisplay(LogLevel.INFO, "Output for command " + command + ": " in disableActivityForUser()
624 + getDevice().executeShellCommand(command)); in disableActivityForUser()
627 private String changeUserRestrictionForUser(String key, String command, int userId) in changeUserRestrictionForUser() argument
631 + " --es extra-command " + command in changeUserRestrictionForUser()
[all …]
DBaseLauncherAppsTest.java49 String command = "am startservice --user 0 " in startCallbackService() local
52 CLog.logAndDisplay(LogLevel.INFO, "Output for command " + command + ": " in startCallbackService()
53 + getDevice().executeShellCommand(command)); in startCallbackService()
DDeviceAndProfileOwnerTest.java190 String command = "am start -a android.intent.action.MAIN -c android.intent.category.HOME"; in testAccountManagement() local
191 CLog.logAndDisplay(LogLevel.INFO, "Output for command " + command + ": " in testAccountManagement()
192 + getDevice().executeShellCommand(command)); in testAccountManagement()
252 String command = "rm " + TEST_APP_LOCATION + apk.getName(); in testPackageInstallUserRestrictions() local
253 getDevice().executeShellCommand(command); in testPackageInstallUserRestrictions()
271 private void changeUserRestrictionForUser(String key, String command, int userId) in changeUserRestrictionForUser() argument
275 + " --es extra-command " + command in changeUserRestrictionForUser()
DMixedProfileOwnerTest.java69 String command = "am start -W --user 0 " + DEVICE_ADMIN_PKG + "/" in testScreenCaptureDisabled_allowedPrimaryUser() local
71 getDevice().executeShellCommand(command); in testScreenCaptureDisabled_allowedPrimaryUser()
/cts/suite/audio_quality/lib/src/audio/
DAudioProtocol.cpp58 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 …]
DRemoteAudio.cpp151 void RemoteAudio::sendCommand(android::sp<android::MessageHandler>& command) in sendCommand() argument
153 mLooper->sendMessage(command, toCommandHandler(command)->getMessage()); in sendCommand()
156 bool RemoteAudio::waitForCompletion(android::sp<android::MessageHandler>& command, int timeInMSec) in waitForCompletion() argument
159 return toCommandHandler(command)->timedWait(timeInMSec); in waitForCompletion()
190 android::sp<android::MessageHandler> command(new CommandHandler(*this, (int)id)); in doStop() local
191 sendCommand(command); in doStop()
192 waitForCompletion(command, CLIENT_WAIT_TIMEOUT_MSEC); in doStop()
331 android::sp<android::MessageHandler> command(new CommandHandler(*this, CommandHandler::EExit)); in release() local
332 sendCommand(command); in release()
DAudioLocal.cpp83 bool AudioLocal::issueCommandAndWaitForCompletion(AudioCommand command) in issueCommandAndWaitForCompletion() argument
85 mCurrentCommand = command; in issueCommandAndWaitForCompletion()
88 LOGE("issueCommandAndWaitForCompletion timeout cmd %d", command); in issueCommandAndWaitForCompletion()
/cts/tests/tests/telephony2/src/android/telephony2/cts/
DPhoneNumberTest.java32 StringBuilder command = new StringBuilder(); in setDefaultSmsApp() local
33 command.append("appops set "); in setDefaultSmsApp()
34 command.append(getInstrumentation().getContext().getPackageName()); in setDefaultSmsApp()
35 command.append(" WRITE_SMS "); in setDefaultSmsApp()
36 command.append(setToSmsApp ? "allow" : "default"); in setDefaultSmsApp()
39 .executeShellCommand(command.toString()); in setDefaultSmsApp()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DSetPolicyActivity.java68 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/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DUserRestrictionActivity.java64 String command = intent.getStringExtra(EXTRA_COMMAND); in handleIntent() local
65 Log.i(TAG, "Command: \"" + command + "\". Restriction: \"" + restrictionKey + "\""); in handleIntent()
67 if (ADD_COMMAND.equals(command)) { in handleIntent()
71 } else if (CLEAR_COMMAND.equals(command)) { in handleIntent()
77 Log.e(TAG, "Invalid command: " + command); in handleIntent()
/cts/tools/utils/
Drerun.py81 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/tests/calllog/src/android/calllog/cts/
DTestUtils.java40 String command) throws Exception { in executeShellCommand() argument
42 try (InputStream in = executeStreamedShellCommand(instrumentation, command)) { in executeShellCommand() argument
58 String command) throws Exception { in executeStreamedShellCommand() argument
60 instrumentation.getUiAutomation().executeShellCommand(command); in executeStreamedShellCommand()
/cts/suite/audio_quality/lib/include/audio/
DRemoteAudio.h76 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()
DAudioProtocol.h82 AudioProtocol(ClientSocket& socket, uint32_t command) in AudioProtocol() argument
83 : mCommand(command), in AudioProtocol()
90 bool checkHeaderId(const uint32_t* data, uint32_t command);
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DDeviceOwnerPositiveTestActivity.java254 private Intent createDeviceOwnerIntentWithBooleanParameter(String command, boolean value) { in createDeviceOwnerIntentWithBooleanParameter() argument
256 .putExtra(EXTRA_COMMAND, command) in createDeviceOwnerIntentWithBooleanParameter()
271 String command = intent.getStringExtra(EXTRA_COMMAND); in onCreate() local
276 Log.i(TAG, "Command: " + command); in onCreate()
278 if (COMMAND_ADD_USER_RESTRICTION.equals(command)) { in onCreate()
282 } else if (COMMAND_CLEAR_USER_RESTRICTION.equals(command)) { in onCreate()
286 } else if (COMMAND_TEAR_DOWN.equals(command)) { in onCreate()
288 } else if (COMMAND_SET_GLOBAL_SETTING.equals(command)) { in onCreate()
292 } else if (COMMAND_SET_STATUSBAR_DISABLED.equals(command)) { in onCreate()
295 } else if (COMMAND_SET_KEYGUARD_DISABLED.equals(command)) { in onCreate()
[all …]
/cts/suite/cts/hostTests/jank/app/src/com/android/cts/jank/
DCtsJankTestBase.java49 protected void runShellCommand(String command) throws Exception { in runShellCommand() argument
54 p = Runtime.getRuntime().exec(command); in runShellCommand()
72 Log.i(TAG, command); in runShellCommand()
84 String.format("Run shell command: %s, status: %s", command, status)); in runShellCommand()
/cts/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/command/
DCompatibilityConsole.java17 package com.android.compatibility.common.tradefed.command;
19 import com.android.tradefed.command.Console;
/cts/suite/audio_quality/executable/src/
Dmain.cpp44 android::String8 command = android::String8::format("cd %s;zip -r ../%s.zip *", in ~CleanupStatics() local
46 fprintf(stderr, "\n\nexecuting %s\n", command.string()); in ~CleanupStatics()
47 if (system(command.string()) == -1) { in ~CleanupStatics()
48 fprintf(stderr, "cannot create zip file with command %s\n", command.string()); in ~CleanupStatics()
/cts/tools/tradefed-host/src/com/android/cts/tradefed/device/
DDeviceInfoCollector.java139 String command = String.format("adb -s %s pull %s %s", device.getSerialNumber(), in pullExtendedDeviceInfoResults() local
141 if (!execute(command)) { in pullExtendedDeviceInfoResults()
142 Log.e(LOG_TAG, String.format("Failed to run %s", command)); in pullExtendedDeviceInfoResults()
146 private static boolean execute(String command) { in execute() argument
148 Process p = Runtime.getRuntime().exec(new String[] {"/bin/bash", "-c", command}); in execute()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBleAdvertiserService.java206 int command = intent.getIntExtra(EXTRA_COMMAND, -1); in handleIntent() local
207 if (command >= 0) { in handleIntent()
209 mAdvertiserStatus |= (1 << command); in handleIntent()
212 switch (command) { in handleIntent()
276 showMessage("Unrecognized command: " + command); in handleIntent()
/cts/tests/tests/telecom/src/android/telecom/cts/
DWiredHeadsetTest.java132 final String command = "input keyevent " + (longPress ? "--longpress" : "--shortpress") in sendMediaButtonPress() local
134 TestUtils.executeShellCommand(getInstrumentation(), command); in sendMediaButtonPress() local

123