Home
last modified time | relevance | path

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

1234

/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/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 …]
DTest.java92 final String arg = mArgs[i++]; in run() local
93 if ("-s".equals(arg)) { in run()
95 } else if ("-m".equals(arg)) { in run()
97 } else if ("-n".equals(arg)) { in run()
100 mUsedTestMethods.add(arg); in run()
/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/robotests/src/com/android/settings/network/
DNetworkScorerPickerTest.java110 ArgumentCaptor<RadioButtonPreference> arg = in testUpdateCandidates_noValidScorers_nonePreference() local
115 verify(mPreferenceScreen).addPreference(arg.capture()); in testUpdateCandidates_noValidScorers_nonePreference()
116 assertThat(arg.getValue().getTitle()) in testUpdateCandidates_noValidScorers_nonePreference()
118 assertThat(arg.getValue().isChecked()).isTrue(); in testUpdateCandidates_noValidScorers_nonePreference()
131 ArgumentCaptor<RadioButtonPreference> arg = in testUpdateCandidates_validScorers_noActiveScorer() local
136 verify(mPreferenceScreen, times(2)).addPreference(arg.capture()); in testUpdateCandidates_validScorers_noActiveScorer()
138 final RadioButtonPreference nonePref = arg.getAllValues().get(0); in testUpdateCandidates_validScorers_noActiveScorer()
142 final RadioButtonPreference testScorerPref = arg.getAllValues().get(1); in testUpdateCandidates_validScorers_noActiveScorer()
156 ArgumentCaptor<RadioButtonPreference> arg = in testUpdateCandidates_validScorer() local
163 verify(mPreferenceScreen, times(2)).addPreference(arg.capture()); in testUpdateCandidates_validScorer()
[all …]
/packages/apps/Settings/tests/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/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/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/apps/DocumentsUI/src/com/android/documentsui/picker/
DConfirmFragment.java64 Bundle arg = (getArguments() != null) ? getArguments() : savedInstanceState; in onCreateDialog() local
66 mTarget = arg.getParcelable(Shared.EXTRA_DOC); in onCreateDialog()
67 mType = arg.getInt(CONFIRM_TYPE); in onCreateDialog()
138 Bundle arg = new Bundle(); in show() local
139 arg.putParcelable(Shared.EXTRA_DOC, overwriteTarget); in show()
140 arg.putInt(CONFIRM_TYPE, type); in show()
144 f.setArguments(arg); in show()
/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/apps/Launcher3/tests/src/com/android/launcher3/testcomponent/
DTestCommandReceiver.java85 public Bundle call(String method, String arg, Bundle extras) { in call() argument
101 killBackgroundProcesses(arg); in call()
108 TestHelpers.getSystemHealthMessage(getContext(), Long.parseLong(arg))); in call()
112 return super.call(method, arg, extras); in call()
119 public static Bundle callCommand(String command, String arg) { in callCommand() argument
122 return inst.getTargetContext().getContentResolver().call(uri, command, arg, null); in callCommand()
/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/apps/Car/libs/car-ui-lib/
Dgradlew132 for arg in "$@" ; do
133 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 … CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
137 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
139 eval `echo args$i`="\"$arg\""
/packages/apps/Car/tests/
Dgradlew132 for arg in "$@" ; do
133 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 … CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
137 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
139 eval `echo args$i`="\"$arg\""
/packages/apps/Car/libs/car-ui-lib/tests/paintbooth/
Dgradlew132 for arg in "$@" ; do
133 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 … CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
137 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
139 eval `echo args$i`="\"$arg\""
/packages/inputmethods/LatinIME/
Dgradlew128 for arg in "$@" ; do
129 CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 … CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
133 eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
135 eval `echo args$i`="\"$arg\""
/packages/services/Telephony/src/com/android/phone/
DTelephonyShellCommand.java290 String arg = getNextArg(); in handleImsCommand() local
291 if (arg == null) { in handleImsCommand()
296 switch (arg) { in handleImsCommand()
319 String arg = getNextArgRequired(); in handleDataTestModeCommand() local
320 if (arg == null) { in handleDataTestModeCommand()
324 switch (arg) { in handleDataTestModeCommand()
438 String arg = getNextArg(); in handleNumberVerificationCommand() local
439 if (arg == null) { in handleNumberVerificationCommand()
448 switch (arg) { in handleNumberVerificationCommand()
769 String arg = getNextArg(); in handleCcCommand() local
[all …]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DContactsPackageMonitor.java69 public void onPerformTask(int taskId, Object arg) { in ContactsPackageMonitor()
72 onPackageChanged((PackageEventArg) arg); in ContactsPackageMonitor()
119 private void onPackageChanged(PackageEventArg arg) { in onPackageChanged() argument
121 final String packageName = arg.packageName; in onPackageChanged()
138 arg.broadcastPendingResult.finish(); in onPackageChanged()
DContactsTaskScheduler.java101 public void scheduleTask(int taskId, Object arg) { in scheduleTask() argument
112 if (arg == null) { in scheduleTask()
115 mHandler.sendMessage(mHandler.obtainMessage(taskId, arg)); in scheduleTask()
124 public abstract void onPerformTask(int taskId, Object arg); in onPerformTask() argument
/packages/modules/NetworkStack/src/com/android/server/connectivity/ipmemorystore/
DIpMemoryStoreDatabase.java528 for (final Object arg : mArgs) { in newCursor()
529 if (arg instanceof String) { in newCursor()
530 query.bindString(index++, (String) arg); in newCursor()
531 } else if (arg instanceof Long) { in newCursor()
532 query.bindLong(index++, (Long) arg); in newCursor()
533 } else if (arg instanceof Integer) { in newCursor()
534 query.bindLong(index++, Long.valueOf((Integer) arg)); in newCursor()
535 } else if (arg instanceof byte[]) { in newCursor()
536 query.bindBlob(index++, (byte[]) arg); in newCursor()
539 + arg.getClass().toString()); in newCursor()
/packages/inputmethods/LatinIME/native/dicttoolkit/src/utils/
Darguments_parser.cpp111 const std::string arg = argv[i]; in parseArguments() local
112 if (arg.length() > 1 && arg[0] == '-') { in parseArguments()
114 const std::string optionName = arg.substr(1); in parseArguments()
142 arguments[argumentSpecIt->getName()].push_back(arg); in parseArguments()
/packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/
DPreferenceListTest.java143 final ArgumentMatcher<VpnProfile> equalsFake = arg -> { in testConnectedLegacyVpnShownExactlyOnce()
144 if (arg == vpnProfile) return true; in testConnectedLegacyVpnShownExactlyOnce()
145 if (arg == null) return false; in testConnectedLegacyVpnShownExactlyOnce()
146 return TextUtils.equals(arg.key, vpnProfile.key); in testConnectedLegacyVpnShownExactlyOnce()
/packages/services/Car/car-lib/src/android/car/vms/
DVmsOperationRecorder.java148 private void recordOp(String operation, String intArgName, int arg) { in recordOp() argument
151 recordOp(operation, new JSONObject().put(intArgName, arg)); in recordOp()
158 private void recordOp(String operation, String intArgName, int arg, VmsLayer layer) { in recordOp() argument
162 new JSONObject().put(intArgName, arg).put("layer", toJson(layer))); in recordOp()

1234