/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-39707/src/android/security/cts/CVE_2021_39707/ |
D | DeviceTest.java | 66 BySelector selector = By.text(textRestrictedUser); in testAppRestrictionsFragment() local 69 device.wait(Until.hasObject(selector), uiTimeoutMs)); in testAppRestrictionsFragment() 70 device.findObject(selector).click(); in testAppRestrictionsFragment() 74 selector = By.text(textAppContentAccess); in testAppRestrictionsFragment() 76 device.wait(Until.hasObject(selector), uiTimeoutMs)); in testAppRestrictionsFragment() 77 device.findObject(selector).click(); in testAppRestrictionsFragment() 87 selector = By.text(textTestApp); in testAppRestrictionsFragment() 89 device.wait(Until.hasObject(selector), uiTimeoutMs)); in testAppRestrictionsFragment() 90 UiObject2 parent = device.findObject(selector).getParent().getParent().getParent(); in testAppRestrictionsFragment() 91 selector = By.res(context.getString(R.string.resTestAppIcon, settingsPkgName)); in testAppRestrictionsFragment() [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | UiAutomatorUtils2.java | 79 public static void waitUntilObjectGone(BySelector selector) { in waitUntilObjectGone() argument 80 waitUntilObjectGone(selector, 20_000); in waitUntilObjectGone() 83 public static void waitUntilObjectGone(BySelector selector, long timeoutMs) { in waitUntilObjectGone() argument 85 if (getUiDevice().wait(Until.gone(selector), timeoutMs)) { in waitUntilObjectGone() 94 throw new RuntimeException("view " + selector + " is still visible after " + timeoutMs in waitUntilObjectGone() 103 public static UiObject2 waitFindObject(BySelector selector) throws UiObjectNotFoundException { in waitFindObject() argument 104 return waitFindObject(selector, 20_000); in waitFindObject() 107 public static UiObject2 waitFindObject(BySelector selector, long timeoutMs) in waitFindObject() argument 109 final UiObject2 view = waitFindObjectOrNull(selector, timeoutMs); in waitFindObject() 111 assertNotNull("View not found after waiting for " + timeoutMs + "ms: " + selector, in waitFindObject() [all …]
|
D | UiAutomatorUtils.java | 74 public static UiObject2 waitFindObject(BySelector selector) throws UiObjectNotFoundException { in waitFindObject() argument 75 return waitFindObject(selector, 20_000); in waitFindObject() 78 public static UiObject2 waitFindObject(BySelector selector, long timeoutMs) in waitFindObject() argument 80 final UiObject2 view = waitFindObjectOrNull(selector, timeoutMs); in waitFindObject() 82 assertNotNull("View not found after waiting for " + timeoutMs + "ms: " + selector, in waitFindObject() 88 public static UiObject2 waitFindObjectOrNull(BySelector selector) in waitFindObjectOrNull() argument 90 return waitFindObjectOrNull(selector, 20_000); in waitFindObjectOrNull() 121 public static UiObject2 waitFindObjectOrNull(BySelector selector, long timeoutMs) in waitFindObjectOrNull() argument 134 view = getUiDevice().wait(Until.findObject(selector), 1000); in waitFindObjectOrNull()
|
/cts/tests/tests/security/src/android/security/cts/CVE_2023_20953/ |
D | CVE_2023_20953.java | 71 BySelector selector = By.text("CVE-2023-20955"); in testCliboardIfUserSetupNotComplete() local 73 boolean uiFound = device.wait(Until.findObject(selector), timeoutMs) != null; in testCliboardIfUserSetupNotComplete() 74 assumeTrue(String.format(uiNotFoundMsg, selector), uiFound); in testCliboardIfUserSetupNotComplete() 75 UiObject2 object = device.findObject(selector); in testCliboardIfUserSetupNotComplete() 80 selector = By.desc(Pattern.compile(".*copy.*", Pattern.CASE_INSENSITIVE)); in testCliboardIfUserSetupNotComplete() 81 uiFound = device.wait(Until.findObject(selector), timeoutMs) != null; in testCliboardIfUserSetupNotComplete() 82 assumeTrue(String.format(uiNotFoundMsg, selector), uiFound); in testCliboardIfUserSetupNotComplete() 83 device.findObject(selector).click(); in testCliboardIfUserSetupNotComplete() 100 selector = By.res(String.format(shareBtnResName, systemUiPkgName)); in testCliboardIfUserSetupNotComplete() 102 device.wait(Until.hasObject(selector), timeoutMs)); in testCliboardIfUserSetupNotComplete()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20223/src/android/security/cts/CVE_2022_20223/ |
D | DeviceTest.java | 54 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument 55 boolean objectFound = mDevice.wait(Until.hasObject(selector), TIMEOUT_MS); in clickUiObject() 57 mDevice.findObject(selector).click(); in clickUiObject() 80 BySelector selector = By.text(text); in testAppRestrictionsFragment() local 81 assumeTrue(mContext.getString(R.string.timedOutMsg, text), clickUiObject(selector)); in testAppRestrictionsFragment() 87 selector = By.text(text); in testAppRestrictionsFragment() 88 assumeTrue(mContext.getString(R.string.timedOutMsg, text), clickUiObject(selector)); in testAppRestrictionsFragment() 95 BySelector selector = By.text(mContext.getString(R.string.userName)); in testAppRestrictionsFragment() local 97 mContext.getString(R.string.userName)), clickUiObject(selector)); in testAppRestrictionsFragment() 106 selector = By.text(text); in testAppRestrictionsFragment() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/proxy/ |
D | PacProxyTest.java | 206 ProxySelector selector = ProxySelector.getDefault(); in testDirect() local 207 List<Proxy> list = selector.select(uri); in testDirect() 222 ProxySelector selector = ProxySelector.getDefault(); in testLocalPlusDirect() local 223 List<Proxy> list = selector.select(uri); in testLocalPlusDirect() 241 ProxySelector selector = ProxySelector.getDefault(); in testHostPassthrough() local 242 List<Proxy> list = selector.select(uri); in testHostPassthrough() 261 ProxySelector selector = ProxySelector.getDefault(); in testUrlPassthrough() local 262 List<Proxy> list = selector.select(uri); in testUrlPassthrough() 268 list = selector.select(uri); in testUrlPassthrough() 284 ProxySelector selector = ProxySelector.getDefault(); in testStringCase() local [all …]
|
D | StaticProxyTest.java | 81 ProxySelector selector = ProxySelector.getDefault(); in testProxySelector() local 82 List<Proxy> list = selector.select(uri); in testProxySelector() 99 ProxySelector selector = ProxySelector.getDefault(); in testProxySelectorExclude() local 100 List<Proxy> list = selector.select(uri); in testProxySelectorExclude() 111 ProxySelector selector = ProxySelector.getDefault(); in testClearProxySelector() local 112 List<Proxy> list = selector.select(uri); in testClearProxySelector()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0602/src/android/security/cts/CVE_2021_0602/ |
D | DeviceTest.java | 62 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument 63 boolean objectFound = mDevice.wait(Until.hasObject(selector), WAIT_MS); in clickUiObject() 65 mDevice.findObject(selector).click(); in clickUiObject() 115 BySelector selector = By.text(workPattern); in testCVE_2021_0602() local 120 clickUiObject(selector)); in testCVE_2021_0602() 160 selector = By.text(text); in testCVE_2021_0602() 165 clickUiObject(selector)); in testCVE_2021_0602() 168 selector = By.text(context.getString(R.string.testNetworkSSID)); in testCVE_2021_0602() 173 clickUiObject(selector)); in testCVE_2021_0602() 179 selector = By.text(workPattern); in testCVE_2021_0602() [all …]
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | MediaProjectionActivity.java | 186 private static UiObject2 findUiObject(BySelector selector) { in findUiObject() argument 188 UiObject2 obj = waitForObject(selector); in findUiObject() 192 Log.w(TAG, "Couldn't find " + selector + ", now scrolling to it."); in findUiObject() 194 obj = waitForObject(selector); in findUiObject() 197 Log.w(TAG, "Still couldn't find " + selector + ", now scrolling screen height."); in findUiObject() 199 obj = UiAutomatorUtils.waitFindObjectOrNull(selector); in findUiObject() 201 Log.e(TAG, "Error in looking for " + selector, e); in findUiObject() 206 Log.e(TAG, "Unable to find " + selector); in findUiObject() 273 private static UiObject2 waitForObject(BySelector selector) { in waitForObject() argument 275 return uiDevice.wait(Until.findObject(selector), PERMISSION_DIALOG_WAIT_MS); in waitForObject()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | BasePermissionUiTest.kt | 112 protected fun waitFindObject(selector: BySelector): UiObject2 { in <lambda>() 114 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObject(selector, t) })!! in <lambda>() 117 protected fun waitFindObject(selector: BySelector, timeoutMillis: Long): UiObject2 { in <lambda>() 119 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObject(selector, t) }, in <lambda>() 123 protected fun waitFindObjectOrNull(selector: BySelector): UiObject2? { in <lambda>() 125 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObjectOrNull(selector, t) }) in <lambda>() 128 protected fun waitFindObjectOrNull(selector: BySelector, timeoutMillis: Long): UiObject2? { in <lambda>() 130 return findObjectWithRetry({ t -> UiAutomatorUtils.waitFindObjectOrNull(selector, t) }, in <lambda>() 156 protected fun click(selector: BySelector, timeoutMillis: Long = 20_000) { in <lambda>() 157 waitFindObject(selector, timeoutMillis).click() in <lambda>() [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20353/src/android/security/cts/CVE_2022_20353/ |
D | DeviceTest.java | 52 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument 54 mDevice.wait(Until.hasObject(selector), mResources.getInteger(R.integer.timeoutMs)); in clickUiObject() 56 mDevice.findObject(selector).click(); in clickUiObject() 88 BySelector selector = By.text(text); in testDefaultRingtonePreference() local 90 clickUiObject(selector)); in testDefaultRingtonePreference() 93 selector = By.text(text); in testDefaultRingtonePreference() 95 clickUiObject(selector)); in testDefaultRingtonePreference() 98 selector = By.res(resId); in testDefaultRingtonePreference() 100 clickUiObject(selector)); in testDefaultRingtonePreference()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21249/test-app/src/android/security/cts/CVE_2023_21249_test/ |
D | DeviceTest.java | 89 BySelector selector = in testPocCVE_2023_21249() local 126 .that(clickUiObject(uiDevice, selector)) in testPocCVE_2023_21249() 131 if (!uiDevice.wait(Until.gone(selector), TIMEOUT_MS)) { in testPocCVE_2023_21249() 132 clickUiObject(uiDevice, selector); in testPocCVE_2023_21249() 183 private boolean clickUiObject(UiDevice uiDevice, BySelector selector) throws Exception { in clickUiObject() argument 184 boolean objectFound = uiDevice.wait(Until.hasObject(selector), TIMEOUT_MS); in clickUiObject() 186 UiObject2 uiobject = uiDevice.findObject(selector); in clickUiObject()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2022-20116/src/android/security/cts/CVE_2022_20116/ |
D | DeviceTest.java | 61 private boolean clickUiObject(BySelector selector) { in clickUiObject() argument 63 mDevice.wait(Until.hasObject(selector), getIntegerRes(R.integer.timeoutMs)); in clickUiObject() 65 mDevice.findObject(selector).click(); in clickUiObject() 81 BySelector selector = By.res(mContext.getString(R.string.callChipResId)); in testOngoingCallController() local 82 clickUiObject(selector); in testOngoingCallController()
|
/cts/tests/tests/sharesheet/src/android/sharesheet/cts/ |
D | CtsNfcResolverDeviceTest.java | 378 private void waitAndAssertFound(BySelector selector) { in waitAndAssertFound() argument 379 assertNotNull(mSharesheet.wait(Until.findObject(selector), in waitAndAssertFound() 386 private void waitAndAssertFoundOnDevice(BySelector selector) { in waitAndAssertFoundOnDevice() argument 387 assertNotNull(mDevice.wait(Until.findObject(selector), WAIT_AND_ASSERT_FOUND_TIMEOUT_MS)); in waitAndAssertFoundOnDevice() 396 private void waitAndAssertNotFound(BySelector selector) { in waitAndAssertNotFound() argument 397 mSharesheet.wait(Until.gone(selector), WAIT_AND_ASSERT_NOT_FOUND_TIMEOUT_MS); in waitAndAssertNotFound() 398 assertNull(mSharesheet.findObject(selector)); in waitAndAssertNotFound() 404 private void waitAndAssertNotFoundOnDevice(BySelector selector) { in waitAndAssertNotFoundOnDevice() argument 405 mDevice.wait(Until.gone(selector), WAIT_AND_ASSERT_NOT_FOUND_TIMEOUT_MS); in waitAndAssertNotFoundOnDevice() 406 assertNull(mDevice.findObject(selector)); in waitAndAssertNotFoundOnDevice()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21254/test-app/src/android/security/cts/CVE_2023_21254_test/ |
D | DeviceTest.java | 89 BySelector selector = in testPocCVE_2023_21254() local 123 .that(uiDevice.wait(Until.hasObject(selector), uiTimeoutMs)) in testPocCVE_2023_21254() 125 uiDevice.findObject(selector).click(); in testPocCVE_2023_21254() 128 if (!uiDevice.wait(Until.gone(selector), uiTimeoutMs)) { in testPocCVE_2023_21254() 129 uiDevice.findObject(selector).click(); in testPocCVE_2023_21254()
|
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/ |
D | ManualPackageInstallTest.java | 125 BySelector selector = getPopUpImageSelector(); in automateDismissInstallBlockedDialog() local 126 mDevice.wait(Until.hasObject(selector), AUTOMATOR_WAIT_TIMEOUT); in automateDismissInstallBlockedDialog() 127 UiObject2 icon = mDevice.findObject(selector); in automateDismissInstallBlockedDialog() 128 assertNotNull("Policy transparency dialog icon not found: " + selector, icon); in automateDismissInstallBlockedDialog()
|
/cts/hostsidetests/devicepolicy/app/common/src/com/android/cts/devicepolicy/ |
D | PermissionUtils.java | 240 BySelector selector = By in findPermissionPromptButton() local 243 Log.v(LOG_TAG, "trying " + selector); in findPermissionPromptButton() 244 device.wait(Until.hasObject(selector), 5000); in findPermissionPromptButton() 245 UiObject2 button = device.findObject(selector); in findPermissionPromptButton() 282 BySelector selector = By in findPermissionPromptButtonAutomotive() local 286 Log.v(LOG_TAG, "selector: " + selector); in findPermissionPromptButtonAutomotive() 287 device.wait(Until.hasObject(selector), 5000); in findPermissionPromptButtonAutomotive() 288 UiObject2 button = device.findObject(selector); in findPermissionPromptButtonAutomotive()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-20955/test-app/src/android/security/cts/CVE_2023_20955_test/ |
D | DeviceTest.java | 52 private void waitAndClick(BySelector selector) { in waitAndClick() argument 53 assumeTrue(mContext.getString(R.string.msgNotFoundTxt, selector.toString()), in waitAndClick() 54 mDevice.wait(Until.hasObject(selector), TIMEOUT_MS)); in waitAndClick() 55 mDevice.findObject(selector).click(); in waitAndClick()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/ |
D | DeviceTest.java | 92 BySelector selector = By.text(pattern); in testOverlayButtonPresence() local 94 if (!mDevice.wait(Until.hasObject(selector.depth(0)), LAUNCH_TIMEOUT_MS)) { in testOverlayButtonPresence() 109 assertNull(message, mDevice.findObject(selector)); in testOverlayButtonPresence()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2024-23707/src/android/security/cts/CVE_2024_23707/ |
D | DeviceTest.java | 105 private boolean clickUiObject(UiDevice uiDevice, BySelector selector) throws Exception { in clickUiObject() argument 106 boolean objectFound = uiDevice.wait(Until.hasObject(selector), 5000 /* timeout */); in clickUiObject() 108 UiObject2 uiobject = uiDevice.findObject(selector); in clickUiObject()
|
/cts/tests/tests/packageinstaller/nopermission/src/android.packageinstaller.nopermission.cts/ |
D | NoPermissionTests.kt | 133 val selector = By.res(PACKAGE_INSTALLER_PACKAGE_NAME, INSTALL_CONFIRM_TEXT_ID) in <lambda>() constant 134 assertTrue(errorMessage, uiDevice.wait(Until.hasObject(selector), WAIT_FOR_UI_TIMEOUT)) in <lambda>() 139 val selector = By.res(PACKAGE_INSTALLER_PACKAGE_NAME, INSTALL_CONFIRM_TEXT_ID) in <lambda>() constant 140 assertFalse(errorMessage, uiDevice.wait(Until.hasObject(selector), WAIT_FOR_UI_TIMEOUT)) in <lambda>()
|
/cts/tests/inputmethod/util/src/android/view/inputmethod/cts/util/ |
D | TestWebView.java | 74 final BySelector selector = By.text("Editor: "); in getInput() local 77 label = timeout.run("waitForObject(" + selector + ")", in getInput() 78 () -> mUiDevice.findObject(selector)); in getInput()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0685/src/android/security/cts/CVE_2021_0685/ |
D | DeviceTest.java | 63 BySelector selector = By.pkg(TEST_PKG); in testPackageElementPresence() local 67 assertNotNull(message, mDevice.findObject(selector)); in testPackageElementPresence()
|
/cts/hostsidetests/securitybulletin/test-apps/TestBluetoothDiscoverable/src/android/security/cts/TestBluetoothDiscoverable/ |
D | PocActivity.java | 68 BySelector selector = By.text(textPattern); in onCreate() local 70 uiDevice.wait(Until.hasObject(selector), getInteger(R.integer.timeoutMs)); in onCreate() 73 UiObject2 uiObject = uiDevice.findObject(selector); in onCreate()
|
/cts/tests/tests/security/src/android/security/cts/CVE_2022_20429/ |
D | PocActivity.java | 71 BySelector selector = By.text(textPattern); in onResume() local 74 Until.hasObject(selector), getInteger(R.integer.cve_2022_20429_timeoutMs)); in onResume() 77 UiObject2 uiObject = uiDevice.findObject(selector); in onResume()
|