Home
last modified time | relevance | path

Searched refs:arg (Results 1 – 25 of 137) sorted by relevance

123456

/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DBpf2Apf.java39 private static int parseImm(String line, String arg) { in parseImm() argument
40 if (!arg.startsWith("#0x")) { in parseImm()
43 final long val_long = Long.parseLong(arg.substring(3), 16); in parseImm()
63 String arg = line.substring(15, Math.min(32, line.length())).trim(); in convertLine() local
72 if (arg.equals("4*([14]&0xf)")) { in convertLine()
79 if (arg.equals("#pktlen")) { in convertLine()
86 if (arg.startsWith("#0x")) { in convertLine()
90 gen.addLoadImmediate(dest, parseImm(line, arg)); in convertLine()
93 if (arg.startsWith("M[")) { in convertLine()
97 int memory_slot = Integer.parseInt(arg.substring(2, arg.length() - 1)); in convertLine()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapbMessage.java572 String[] arg = line.split(":"); in parse() local
573 if (arg != null && arg.length == 2) { in parse()
574 if (arg[1].trim().equals("READ")) { in parse()
576 } else if (arg[1].trim().equals("UNREAD")) { in parse()
579 throw new IllegalArgumentException("Wrong value in 'STATUS': " + arg[1]); in parse()
586 String[] arg = line.split(":"); in parse() local
587 if (arg != null && arg.length == 2) { in parse()
588 String value = arg[1].trim(); in parse()
594 String[] arg = line.split(":"); in parse() local
595 if (arg != null && arg.length == 2) { in parse()
[all …]
/packages/modules/Virtualization/virtmanager/src/
Dcrosvm.rs129 command.arg("run").arg("--disable-sandbox").arg("--cid").arg(cid.to_string()); in run_vm()
134 command.arg("--serial=type=sink"); in run_vm()
137 command.arg("--bios").arg(bootloader); in run_vm()
140 command.arg("--initrd").arg(initrd); in run_vm()
143 command.arg("--params").arg(params); in run_vm()
146 command.arg(if disk.writable { "--rwdisk" } else { "--disk" }).arg(&disk.image); in run_vm()
149 command.arg(kernel); in run_vm()
/packages/modules/adb/
Dsocket_test.cpp112 static void CreateCloser(CloseWithPacketArg* arg) { in CreateCloser() argument
113 fdevent_run_on_main_thread([arg]() { in CreateCloser()
114 asocket* s = create_local_socket(std::move(arg->socket_fd)); in CreateCloser()
116 arg->bytes_written = 0; in CreateCloser()
126 arg->bytes_written += data.size(); in CreateCloser()
138 asocket* cause_close_s = create_local_socket(std::move(arg->cause_close_fd)); in CreateCloser()
156 CloseWithPacketArg arg; in TEST_F() local
157 arg.socket_fd.reset(socket_fd[1]); in TEST_F()
158 arg.cause_close_fd.reset(cause_close_fd[1]); in TEST_F()
161 CreateCloser(&arg); in TEST_F()
[all …]
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/
DDictionaryMaker.java128 final String arg = args.get(0); in Arguments() local
130 if (arg.charAt(0) == '-') { in Arguments()
131 if (OPTION_VERSION_2.equals(arg)) { in Arguments()
133 } else if (OPTION_VERSION_4.equals(arg)) { in Arguments()
135 } else if (OPTION_HELP.equals(arg)) { in Arguments()
140 throw new IllegalArgumentException("Option " + arg + " is unknown or " in Arguments()
145 if (OPTION_INPUT_SOURCE.equals(arg)) { in Arguments()
154 } else if (OPTION_OUTPUT_BINARY.equals(arg)) { in Arguments()
156 } else if (OPTION_OUTPUT_COMBINED.equals(arg)) { in Arguments()
158 } else if (OPTION_CODE_POINT_TABLE.equals(arg)) { in Arguments()
[all …]
/packages/modules/Virtualization/compos/src/
Dpvm_exec.rs78 fn parse_arg_fd(arg: &str) -> Result<RawFd> { in parse_arg_fd()
79 let fd = arg.parse::<RawFd>()?; in parse_arg_fd()
95 .arg(clap::Arg::with_name("in-fd") in parse_args()
100 .arg(clap::Arg::with_name("out-fd") in parse_args()
105 .arg(clap::Arg::with_name("debug") in parse_args()
107 .arg(clap::Arg::with_name("args") in parse_args()
116 .map(|arg| { in parse_args()
117 let fd = parse_arg_fd(arg)?; in parse_args()
127 .map(|arg| { in parse_args()
128 let fd = parse_arg_fd(arg)?; in parse_args()
Dcompsvc_worker.rs144 .arg(clap::Arg::with_name("authfs-root") in parse_args()
149 .arg(clap::Arg::with_name("in-fd") in parse_args()
154 .arg(clap::Arg::with_name("out-fd") in parse_args()
159 .arg(clap::Arg::with_name("debug") in parse_args()
161 .arg(clap::Arg::with_name("args") in parse_args()
174 .map(|arg| { in parse_args()
175 if let Some(index) = arg.find(':') { in parse_args()
176 let (fd, size) = arg.split_at(index); in parse_args()
179 bail!("Invalid argument: {}", arg); in parse_args()
189 .map(|arg| Ok(OutFdAnnotation { fd: arg.parse()? })) in parse_args()
/packages/apps/Contacts/tests/src/com/android/contacts/
DDynamicShortcutsTests.java160 final List<ShortcutInfo> arg = updateArgs.getValue(); in test_updatePinned_updatesExistingShortcutsWithMatchingKeys() local
161 assertThat(arg.size(), equalTo(3)); in test_updatePinned_updatesExistingShortcutsWithMatchingKeys()
162 assertThat(arg.get(0), in test_updatePinned_updatesExistingShortcutsWithMatchingKeys()
164 assertThat(arg.get(1), in test_updatePinned_updatesExistingShortcutsWithMatchingKeys()
166 assertThat(arg.get(2), in test_updatePinned_updatesExistingShortcutsWithMatchingKeys()
187 final List<ShortcutInfo> arg = updateArgs.getValue(); in test_refresh_setsDynamicShortcutsToStrequentContacts() local
188 assertThat(arg.size(), equalTo(3)); in test_refresh_setsDynamicShortcutsToStrequentContacts()
189 assertThat(arg.get(0), isShortcutForContact(1l, "starred_key", "starred name")); in test_refresh_setsDynamicShortcutsToStrequentContacts()
190 assertThat(arg.get(1), isShortcutForContact(2l, "freq_key", "freq name")); in test_refresh_setsDynamicShortcutsToStrequentContacts()
191 assertThat(arg.get(2), isShortcutForContact(3l, "starred_2", "Starred Two")); in test_refresh_setsDynamicShortcutsToStrequentContacts()
[all …]
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/display/
DThemePreferenceControllerTest.java91 ArgumentCaptor<String[]> arg = ArgumentCaptor.forClass(String[].class); in testUpdateState() local
92 verify(pref).setEntries(arg.capture()); in testUpdateState()
95 CharSequence[] entries = arg.getValue(); in testUpdateState()
98 verify(pref).setEntryValues(arg.capture()); in testUpdateState()
99 CharSequence[] entryValues = arg.getValue(); in testUpdateState()
130 ArgumentCaptor<String[]> arg = ArgumentCaptor.forClass(String[].class); in testUpdateState_withStaticOverlay() local
131 verify(pref).setEntries(arg.capture()); in testUpdateState_withStaticOverlay()
134 CharSequence[] entries = arg.getValue(); in testUpdateState_withStaticOverlay()
137 verify(pref).setEntryValues(arg.capture()); in testUpdateState_withStaticOverlay()
138 CharSequence[] entryValues = arg.getValue(); in testUpdateState_withStaticOverlay()
/packages/services/Telephony/src/com/android/phone/
DTelephonyShellCommand.java660 String arg = getNextArg(); in handleImsCommand() local
661 if (arg == null) { in handleImsCommand()
666 switch (arg) { in handleImsCommand()
692 String arg = getNextArgRequired(); in handleDataTestModeCommand() local
693 if (arg == null) { in handleDataTestModeCommand()
697 switch (arg) { in handleDataTestModeCommand()
824 String arg = getNextArg(); in handleNumberVerificationCommand() local
825 if (arg == null) { in handleNumberVerificationCommand()
834 switch (arg) { in handleNumberVerificationCommand()
886 String arg = getNextArg(); in handleThermalMitigationCommand() local
[all …]
/packages/services/Car/cpp/watchdog/server/tests/
DOveruseConfigurationTestUtils.cpp40 return arg.componentLevelThresholds == config.componentLevelThresholds &&
42 arg.packageSpecificThresholds, result_listener) &&
44 arg.categorySpecificThresholds, result_listener) &&
46 arg.systemWideThresholds, result_listener);
50 if (arg.getTag() != config.getTag()) {
55 const ResourceSpecificConfiguration& actual = arg;
56 switch (arg.getTag()) {
71 return arg.packageName == expected.packageName &&
72 arg.appCategoryType == expected.appCategoryType;
/packages/modules/NeuralNetworks/tools/test_generator/tests/
Dtest.py279 for arg in sys.argv[1:]:
280 if arg in ('-h', '--help'):
283 elif arg in ('-n', '--no-cleanup'):
285 elif arg in ('-u', '--update-cts'):
287 elif arg in ('-v', '--verbose'):
289 elif arg in ('-z', '--zero-return'):
293 if os.path.isdir(arg):
294 files.append(arg)
296 print >> sys.stderr, 'Invalid test or option: %s' % arg
/packages/modules/Virtualization/authfs/fd_server/src/
Dmain.rs251 fn parse_arg_ro_fds(arg: &str) -> Result<(i32, FdConfig)> { in parse_arg_ro_fds()
252 let result: Result<Vec<i32>, _> = arg.split(':').map(|x| x.parse::<i32>()).collect(); in parse_arg_ro_fds()
255 bail!("Too many options: {}", arg); in parse_arg_ro_fds()
269 fn parse_arg_rw_fds(arg: &str) -> Result<(i32, FdConfig)> { in parse_arg_rw_fds()
270 let fd = arg.parse::<i32>()?; in parse_arg_rw_fds()
281 .arg(clap::Arg::with_name("ro-fds") in parse_args()
285 .arg(clap::Arg::with_name("rw-fds") in parse_args()
293 for arg in args { in parse_args()
294 let (fd, config) = parse_arg_ro_fds(arg)?; in parse_args()
299 for arg in args { in parse_args()
[all …]
/packages/modules/adb/client/
Dadb_install.cpp315 const auto arg = std::string_view(argv[i]); in install_app_incremental() local
316 if (android::base::EndsWithIgnoreCase(arg, ".apk"sv)) { in install_app_incremental()
321 } else if (arg.starts_with("install"sv)) { in install_app_incremental()
325 passthrough_args.push_back(arg); in install_app_incremental()
438 for (auto&& arg : argv) { in parse_install_mode()
439 if (arg == "--streaming"sv) { in parse_install_mode()
441 } else if (arg == "--no-streaming"sv) { in parse_install_mode()
443 } else if (strlen(arg) >= "--incr"sv.size() && "--incremental"sv.starts_with(arg)) { in parse_install_mode()
445 } else if (strlen(arg) >= "--no-incr"sv.size() && "--no-incremental"sv.starts_with(arg)) { in parse_install_mode()
447 } else if (arg == "--wait"sv) { in parse_install_mode()
[all …]
/packages/modules/adb/fdevent/
Dfdevent.cpp40 (*f)(fde->fd.get(), events, fde->arg); in invoke_fde()
42 (*f)(fde, events, fde->arg); in invoke_fde()
63 fdevent* fdevent_context::Create(unique_fd fd, std::variant<fd_func, fd_func2> func, void* arg) { in Create() argument
77 fde->arg = arg; in Create()
208 fdevent* fdevent_create(int fd, fd_func func, void* arg) { in fdevent_create() argument
210 return fdevent_get_ambient()->Create(std::move(ufd), func, arg); in fdevent_create()
213 fdevent* fdevent_create(int fd, fd_func2 func, void* arg) { in fdevent_create() argument
215 return fdevent_get_ambient()->Create(std::move(ufd), func, arg); in fdevent_create()
/packages/apps/DocumentsUI/src/com/android/documentsui/picker/
DConfirmFragment.java62 Bundle arg = (getArguments() != null) ? getArguments() : savedInstanceState; in onCreateDialog() local
64 mTarget = arg.getParcelable(Shared.EXTRA_DOC); in onCreateDialog()
65 mType = arg.getInt(CONFIRM_TYPE); in onCreateDialog()
117 Bundle arg = new Bundle(); in show() local
118 arg.putParcelable(Shared.EXTRA_DOC, overwriteTarget); in show()
119 arg.putInt(CONFIRM_TYPE, type); in show()
123 f.setArguments(arg); in show()
/packages/modules/DnsResolver/tests/
Dpbtxt2pb_converter_host.cpp73 std::string arg = argv[i]; in main() local
74 if (arg.find(arg_in) == 0) { in main()
75 pbtxtFile = filesystem::path(arg.substr(arg_in.size())); in main()
76 } else if (arg.find(arg_out) == 0) { in main()
77 pbOutDir = filesystem::path(arg.substr(arg_out.size())); in main()
79 cerr << "Unknown argument: " << arg << endl; in main()
Dresolv_stats_test_utils.h60 arg, result_listener);
64 const int eventSize = arg.dns_query_event_size();
72 PrintTo(arg.dns_query_event(i), result_listener->stream());
78 ::testing::Value(arg.dns_query_event(i), DnsQueryEventEq(other.dns_query_event(i)));
81 PrintTo(arg.dns_query_event(i), result_listener->stream());
121 arg, result_listener);
/packages/services/Car/service/src/com/android/car/
DCarShellCommand.java410 String arg = null; in onCommand() local
412 arg = getNextArg(); in onCommand()
413 if (arg != null) { in onCommand()
414 argsList.add(arg); in onCommand()
416 } while (arg != null); in onCommand()
1264 String arg = args[i];
1265 switch (arg) {
1270 writer.println("Invalid option at index " + i + ": " + arg);
1345 String arg = args[i];
1346 switch (arg) {
[all …]
/packages/inputmethods/LatinIME/tools/make-keyboard-text/src/com/android/inputmethod/keyboard/tools/
DMakeKeyboardText.java40 String arg = null; in Options() local
44 arg = args.removeFirst(); in Options()
45 if (arg.equals(OPTION_JAVA)) { in Options()
48 usage("Unknown option: " + arg); in Options()
52 usage("Option " + arg + " needs argument"); in Options()
/packages/modules/Connectivity/tests/cts/hostside/app/src/com/android/cts/net/hostside/
DNetworkCallbackTest.java64 public final Object arg; field in NetworkCallbackTest.CallbackInfo
67 state = s; network = n; arg = o; in CallbackInfo()
71 return String.format("%s (%s) (%s)", state, network, arg); in toString()
80 && Objects.equals(arg, other.arg); in equals()
85 return Objects.hash(state, network, arg); in hashCode()
158 assertEquals(expectBlocked, cb.arg); in expectBlockedStatusCallbackEventually()
172 || (hasCap != ((NetworkCapabilities) cb.arg).hasCapability(cap))) { in expectCapabilitiesCallbackEventually()
/packages/apps/Car/libs/car-arch-common/tests/robotests/src/com/android/car/arch/common/
DLiveDataFunctionsTest.java355 testOperator(arg -> () -> in testIfThenElse_liveDataParams_truthTable()
356 ifThenElse(arg.mPredicate, Boolean::booleanValue, arg.mTrueData, in testIfThenElse_liveDataParams_truthTable()
357 arg.mFalseData), in testIfThenElse_liveDataParams_truthTable()
481 testOperator(arg -> () -> ifThenElse(arg.mPredicate, Boolean::booleanValue, arg.mTrueValue, in testIfThenElse_valueParams_truthTable()
482 arg.mFalseValue), in testIfThenElse_valueParams_truthTable()
825 for (Pair<P, R> arg : args) { in testOperator()
826 testOperator(ops.apply(arg.first), arg.second); in testOperator()
833 testOperator(arg -> () -> op.apply(arg), args); in testUnaryOperator()
840 testOperator(arg -> () -> op.apply(arg.first, arg.second), args); in testBinaryOperator()
860 for (Pair<LiveData<A>, LiveData<B>> arg : args) { in checkUninitializedBinary()
[all …]
/packages/modules/adb/daemon/
Dservices.cpp104 for (const std::string& arg : android::base::Split(service_args, ",")) { in ShellService() local
105 if (arg == kShellServiceArgRaw) { in ShellService()
107 } else if (arg == kShellServiceArgPty) { in ShellService()
109 } else if (arg == kShellServiceArgShellProtocol) { in ShellService()
111 } else if (arg.starts_with("TERM=")) { in ShellService()
112 terminal_type = arg.substr(strlen("TERM=")); in ShellService()
113 } else if (!arg.empty()) { in ShellService()
115 LOG(WARNING) << "Ignoring unknown shell service argument: " << arg; in ShellService()
/packages/apps/TV/tests/input/src/com/android/tv/testinput/instrument/
DTestSetupInstrumentation.java116 private int getArgumentAsInt(String arg, int defaultValue) { in getArgumentAsInt() argument
117 String stringValue = mArguments.getString(arg); in getArgumentAsInt()
125 + arg in getArgumentAsInt()
140 public static TestSetupException fromMissingArg(String arg) { in fromMissingArg() argument
142 String.format("Error: missing mandatory argument '%s'", arg)); in fromMissingArg()
/packages/modules/NeuralNetworks/tools/test_generator/
Dtest_generator.py473 for arg in args:
474 self.AddOperand(arg)
482 for arg in args:
483 self.AddOperand(arg)
701 def TransformOperand(self, op, arg=None): argument
735 targetTypes = list(zip(*(arg for arg in self.targetOperands.values()
736 if type(arg) is not DataTypeConverter)))[0]
778 def TransformOperand(self, op, arg=None): argument
779 if type(arg) is DataTypeConverter:
783 op.value[0] = arg.ApplyTo(op.value[0])
[all …]

123456