Home
last modified time | relevance | path

Searched refs:resourceId (Results 1 – 25 of 45) sorted by relevance

12

/cts/libs/input/src/com/android/cts/input/
DInputJsonParser.java92 private JSONArray getJsonArrayFromResource(int resourceId) { in getJsonArrayFromResource() argument
93 String data = readRawResource(resourceId); in getJsonArrayFromResource()
98 "Could not parse resource " + resourceId + ", received: " + data); in getJsonArrayFromResource()
123 public String readRegisterCommand(int resourceId) { in readRegisterCommand() argument
124 return readRawResource(resourceId); in readRegisterCommand()
152 public int readDeviceId(int resourceId) { in readDeviceId() argument
154 JSONObject json = new JSONObject(readRawResource(resourceId)); in readDeviceId()
157 throw new RuntimeException("Could not read device id from resource " + resourceId); in readDeviceId()
167 public int readVendorId(int resourceId) { in readVendorId() argument
169 JSONObject json = new JSONObject(readRawResource(resourceId)); in readVendorId()
[all …]
/cts/helpers/default/src/com/android/cts/helpers/aosp/
DDefaultCtsPrintHelper.java125 UiObject retryButton = mDevice.findObject(new UiSelector().resourceId( in retryPrintJob()
145 button = mDevice.findObject(new UiSelector().resourceId("android:id/button1")); in answerPrintServicesWarning()
147 button = mDevice.findObject(new UiSelector().resourceId("android:id/button2")); in answerPrintServicesWarning()
208 UiObject orientationSpinner = mDevice.findObject(new UiSelector().resourceId( in setPageOrientation()
222 UiObject orientationSpinner = mDevice.findObject(new UiSelector().resourceId( in getPageOrientation()
234 UiObject mediaSizeSpinner = mDevice.findObject(new UiSelector().resourceId( in setMediaSize()
248 UiObject colorSpinner = mDevice.findObject(new UiSelector().resourceId( in setColorMode()
262 UiObject colorSpinner = mDevice.findObject(new UiSelector().resourceId( in getColorMode()
274 UiObject duplexSpinner = mDevice.findObject(new UiSelector().resourceId( in setDuplexMode()
288 UiObject copies = mDevice.findObject(new UiSelector().resourceId( in setCopies()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DIntent_ShortcutIconResourceTest.java32 final int resourceId = android.content.cts.R.string.notify; field in Intent_ShortcutIconResourceTest
43 resourceId); in testToString()
45 resourceId); in testToString()
53 resourceId); in testFromContext()
55 resourceId); in testFromContext()
/cts/tests/tests/view/src/android/view/cts/input/
DInputDeviceVibratorTest.java105 final int resourceId = R.raw.google_gamepad_register; in setup() local
111 mDeviceId = mParser.readDeviceId(resourceId); in setup()
112 String registerCommand = mParser.readRegisterCommand(resourceId); in setup()
114 mParser.readVendorId(resourceId), mParser.readProductId(resourceId), in setup()
116 mVibrator = getVibrator(mParser.readVendorId(resourceId), in setup()
117 mParser.readProductId(resourceId)); in setup()
130 public void testInputVibratorEvents(int resourceId) { in testInputVibratorEvents() argument
131 final List<UinputVibratorTestData> tests = mParser.getUinputVibratorTestData(resourceId); in testInputVibratorEvents()
DInputDeviceVibratorManagerTest.java88 final int resourceId = R.raw.google_gamepad_register; in setup() local
93 mDeviceId = mParser.readDeviceId(resourceId); in setup()
94 String registerCommand = mParser.readRegisterCommand(resourceId); in setup()
96 mParser.readVendorId(resourceId), mParser.readProductId(resourceId), in setup()
98 mVibratorManager = getVibratorManager(mParser.readVendorId(resourceId), in setup()
99 mParser.readProductId(resourceId)); in setup()
146 public void testInputVibratorManagerEvents(int resourceId) { in testInputVibratorManagerEvents() argument
148 mParser.getUinputVibratorManagerTestData(resourceId); in testInputVibratorManagerEvents()
DInputDeviceSensorManagerTest.java371 final int resourceId = R.raw.gamepad_sensors_register; in setup() local
377 mDeviceId = mParser.readDeviceId(resourceId); in setup()
378 String registerCommand = mParser.readRegisterCommand(resourceId); in setup()
379 final int vendorId = mParser.readVendorId(resourceId); in setup()
380 final int productId = mParser.readProductId(resourceId); in setup()
/cts/tests/tests/preference/src/android/preference/cts/
DTestUtils.java135 int resourceId = mInstrumentation.getTargetContext().getResources() in getStatusBarHeight() local
137 if (resourceId > 0) { in getStatusBarHeight()
139 .getDimensionPixelSize(resourceId); in getStatusBarHeight()
152 int resourceId = mInstrumentation.getTargetContext().getResources() in getNavigationBarHeight() local
154 if (resourceId > 0) { in getNavigationBarHeight()
156 .getDimensionPixelSize(resourceId); in getNavigationBarHeight()
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/
DSplitAppTest.java152 int resourceId = resources.getIdentifier(FEATURE_A_STRING, null, null); in shouldLoadFeatureADefault() local
153 assertThat(resources.getString(resourceId), equalTo("Feature A String Default")); in shouldLoadFeatureADefault()
177 int resourceId = resources.getIdentifier(FEATURE_A_STRING, null, null); in shouldLoadFeatureAPolishLocale() local
178 assertThat(resources.getString(resourceId), equalTo("Feature A String Polish")); in shouldLoadFeatureAPolishLocale()
213 int resourceId = resources.getIdentifier(FEATURE_A_STRING, null, null); in shouldLoadFeatureBDefault() local
214 assertThat(resources.getString(resourceId), equalTo("Feature A String Default")); in shouldLoadFeatureBDefault()
217 resourceId = resources.getIdentifier(FEATURE_B_STRING, null, null); in shouldLoadFeatureBDefault()
218 assertThat(resources.getString(resourceId), equalTo("Feature B String Default")); in shouldLoadFeatureBDefault()
241 int resourceId = resources.getIdentifier(FEATURE_A_STRING, null, null); in shouldLoadFeatureBPolishLocale() local
242 assertThat(resources.getString(resourceId), equalTo("Feature A String Polish")); in shouldLoadFeatureBPolishLocale()
[all …]
DTestTheme.java214 private String getString(Resources.Theme theme, int resourceId) { in getString() argument
215 final TypedArray ta = theme.obtainStyledAttributes(new int[] {resourceId}); in getString()
221 private int getColor(Resources.Theme theme, int resourceId) { in getColor() argument
222 if (resourceId == 0) { in getColor()
225 final TypedArray ta = theme.obtainStyledAttributes(new int[] {resourceId}); in getColor()
231 private int getDrawableColor(Resources.Theme theme, int resourceId) { in getDrawableColor() argument
232 final TypedArray ta = theme.obtainStyledAttributes(new int[] {resourceId}); in getDrawableColor()
/cts/tests/input/src/android/input/cts/
DGamepadWithAccessibilityTest.kt96 val resourceId = R.raw.google_gamepad_register in testDeviceId() constant
99 val resourceDeviceId = parser.readDeviceId(resourceId) in testDeviceId()
100 val registerCommand = parser.readRegisterCommand(resourceId) in testDeviceId()
102 parser.readVendorId(resourceId), parser.readProductId(resourceId), in testDeviceId()
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/
DHelper.java382 public static ViewNode findNodeByResourceId(AssistStructure structure, String resourceId) { in findNodeByResourceId() argument
383 return findNodeByFilter(structure, resourceId, RESOURCE_ID_FILTER); in findNodeByResourceId()
389 public static ViewNode findNodeByResourceId(List<FillContext> contexts, String resourceId) { in findNodeByResourceId() argument
390 return findNodeByFilter(contexts, resourceId, RESOURCE_ID_FILTER); in findNodeByResourceId()
396 public static ViewNode findNodeByResourceId(ViewNode node, String resourceId) { in findNodeByResourceId() argument
397 return findNodeByFilter(node, resourceId, RESOURCE_ID_FILTER); in findNodeByResourceId()
442 @NonNull String resourceId) { in findAutofillIdByResourceId() argument
443 final ViewNode node = findNodeByFilter(context.getStructure(), resourceId, in findAutofillIdByResourceId()
445 assertWithMessage("No node for resourceId %s", resourceId).that(node).isNotNull(); in findAutofillIdByResourceId()
515 final String resourceId = node.getIdEntry(); in assertTextIsSanitized() local
[all …]
/cts/tests/tests/view/src/android/view/cts/
DPrecompiledLayoutTest.java69 private void compareInflation(int resourceId) { in compareInflation() argument
72 View interpreted = mInflater.inflate(resourceId, null); in compareInflation()
76 View precompiled = mInflater.inflate(resourceId, null); in compareInflation()
/cts/tests/tests/hardware/src/android/hardware/input/cts/tests/
DInputUinputTestCase.java47 protected void testInputDeviceEvents(int resourceId) { in testInputDeviceEvents() argument
48 List<UinputTestData> tests = mParser.getUinputTestData(resourceId); in testInputDeviceEvents()
DInputHidTestCase.java218 protected void testInputDeviceEvents(int resourceId) { in testInputDeviceEvents() argument
219 List<HidTestData> tests = mParser.getHidTestData(resourceId); in testInputDeviceEvents()
252 public void testInputVibratorEvents(int resourceId) throws Exception { in testInputVibratorEvents() argument
253 final List<HidVibratorTestData> tests = mParser.getHidVibratorTestData(resourceId); in testInputVibratorEvents()
329 public void testInputVibratorManagerEvents(int resourceId) throws Exception { in testInputVibratorManagerEvents() argument
330 final List<HidVibratorTestData> tests = mParser.getHidVibratorTestData(resourceId); in testInputVibratorManagerEvents()
391 public void testInputBatteryEvents(int resourceId) { in testInputBatteryEvents() argument
395 final List<HidBatteryTestData> tests = mParser.getHidBatteryTestData(resourceId); in testInputBatteryEvents()
420 public void testInputLightsManager(int resourceId) throws Exception { in testInputLightsManager() argument
424 final List<HidLightTestData> tests = mParser.getHidLightTestData(resourceId); in testInputLightsManager()
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DTestThemeHelper.java134 private int getColor(Resources.Theme theme, int resourceId) { in getColor() argument
135 final TypedArray ta = theme.obtainStyledAttributes(new int[] {resourceId}); in getColor()
141 private int getDrawableColor(Resources.Theme theme, int resourceId) { in getDrawableColor() argument
142 final TypedArray ta = theme.obtainStyledAttributes(new int[] {resourceId}); in getDrawableColor()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DRequiredSystemResourceRule.java83 final int resourceId = Resources.getSystem().getIdentifier(name, "string", "android");
84 return Resources.getSystem().getString(resourceId);
DMediaUtils.java500 Context context, int resourceId, int track, String mimePrefix) { in hasCodecsForResourceCombo() argument
505 afd = context.getResources().openRawResourceFd(resourceId); in hasCodecsForResourceCombo()
532 public static boolean hasCodecsForResource(Context context, int resourceId) { in hasCodecsForResource() argument
533 return hasCodecsForResourceCombo(context, resourceId, ALL_AV_TRACKS, null /* mimePrefix */); in hasCodecsForResource()
536 public static boolean checkCodecsForResource(Context context, int resourceId) { in checkCodecsForResource() argument
537 return check(hasCodecsForResource(context, resourceId), "no decoder found"); in checkCodecsForResource()
551 public static boolean hasCodecForResource(Context context, int resourceId, int track) { in hasCodecForResource() argument
552 return hasCodecsForResourceCombo(context, resourceId, track, null /* mimePrefix */); in hasCodecForResource()
555 public static boolean checkCodecForResource(Context context, int resourceId, int track) { in checkCodecForResource() argument
556 return check(hasCodecForResource(context, resourceId, track), "no decoder found"); in checkCodecForResource()
[all …]
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/
DDocumentsClientTest.java76 return new UiSelector().resourceId( in findRootListSelector()
78 new UiSelector().resourceId(getDocumentsUiPackageId() + ":id/roots_list")); in findRootListSelector()
86 final UiSelector hamburger = new UiSelector().resourceId( in revealRoot()
101 final UiSelector selector = new UiSelector().resourceId( in findSearchViewTextField()
103 new UiSelector().resourceId(getDocumentsUiPackageId() + ":id/search_src_text")); in findSearchViewTextField()
122 new UiSelector().resourceId(getDocumentsUiPackageId() + ":id/action_icon_area"); in findActionIcon()
127 …final UiSelector docList = new UiSelector().resourceId(getDocumentsUiPackageId() + ":id/dir_list"); in findDocument()
136 …new UiObject(new UiSelector().resourceId(getDocumentsUiPackageId() + ":id/sub_menu_list")).click(); in findDocument()
167 return new UiObject(new UiSelector().resourceId( in findSaveButton()
169 .childSelector(new UiSelector().resourceId("android:id/button1"))); in findSaveButton()
[all …]
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/
DUtils.java76 public static void showToast(Context context, int resourceId) { in showToast() argument
77 Toast.makeText(context, context.getString(resourceId), Toast.LENGTH_LONG).show(); in showToast()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DFatActivityTest.java225 private ViewNode assertNodeExists(String resourceId, int expectedImportantForAutofill) {
227 final ViewNode node = findNodeByResourceId(mRoot, resourceId);
228 assertWithMessage("no node with resource id '%s'", resourceId).that(node).isNotNull();
229 return assertNode(node, resourceId, expectedImportantForAutofill);
/cts/tests/translation/src/android/translation/cts/
DHelper.java142 public static UiObject2 findObjectByResId(String resourcePackage, String resourceId) { in findObjectByResId() argument
146 Until.findObject(By.res(resourcePackage, resourceId)), 5_000L); in findObjectByResId()
/cts/tests/tests/util/src/android/util/cts/
DTypedValueTest.java72 tv1.resourceId = 4; in testSetTo()
81 assertEquals(4, tv2.resourceId); in testSetTo()
136 tv.resourceId = 4; in testToString()
175 tv.resourceId = 4; in testCoerceToString1()
/cts/tests/tests/widget/src/android/widget/cts/
DDigitalClockTest.java122 private AttributeSet getAttributeSet(int resourceId) { in getAttributeSet() argument
123 XmlResourceParser parser = mActivity.getResources().getXml(resourceId); in getAttributeSet()
/cts/tests/autofillservice/src/android/autofillservice/cts/activities/
DVirtualContainerView.java242 child.setId(1000 + index, packageName, "id", item.resourceId); in onProvideAutofillVirtualStructure()
548 private final String resourceId; field in VirtualContainerView.Item
555 public Item(Line line, int id, String resourceId, CharSequence text, boolean editable, in Item() argument
559 this.resourceId = resourceId; in Item()
572 node.setViewIdResourceName(resourceId); in provideAccessibilityNodeInfo()
600 return id + "/" + resourceId + ": " + text + (editable ? " (editable)" : " (read-only)" in toString()
/cts/tests/autofillservice/src/android/autofillservice/cts/saveui/
DCustomDescriptionDateTest.java168 private RemoteViews newTemplate(int resourceId) {
169 return new RemoteViews(getContext().getPackageName(), resourceId);

12