/cts/hostsidetests/incident/apps/graphicsstatsapp/src/com/android/server/cts/device/graphicsstats/ |
D | SimpleDrawFrameTests.java | 41 DrawFramesActivity activity = mActivityRule.getActivity(); in testDrawTenFrames() local 42 activity.waitForReady(); in testDrawTenFrames() 43 assertEquals(1, activity.getRenderedFramesCount()); in testDrawTenFrames() 44 assertEquals(0, activity.getDroppedReportsCount()); in testDrawTenFrames() 45 activity.drawFrames(10); in testDrawTenFrames() 46 assertEquals(11, activity.getRenderedFramesCount()); in testDrawTenFrames() 47 assertEquals(0, activity.getDroppedReportsCount()); in testDrawTenFrames() 52 DrawFramesActivity activity = mActivityRule.getActivity(); in testDrawJankyFrames() local 53 activity.waitForReady(); in testDrawJankyFrames() 54 assertEquals(1, activity.getRenderedFramesCount()); in testDrawJankyFrames() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | DisableAutofillTest.java | 99 final SimpleSaveActivity activity = startSimpleSaveActivity(); in launchSimpleSaveActivity() local 100 final MyAutofillCallback callback = activity.registerCallback(); in launchSimpleSaveActivity() 104 activity.syncRunOnUiThread(() -> activity.mInput.requestFocus()); in launchSimpleSaveActivity() 107 callback.assertUiUnavailableEvent(activity.mInput); in launchSimpleSaveActivity() 111 activity.syncRunOnUiThread(() -> activity.mPassword.requestFocus()); in launchSimpleSaveActivity() 115 activity.getAutofillManager().requestAutofill(activity.mInput); in launchSimpleSaveActivity() 118 callback.assertUiShownEvent(activity.mInput); in launchSimpleSaveActivity() 121 activity.expectAutoFill("id", "pass"); in launchSimpleSaveActivity() 127 assertAutofillEnabled(activity, action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL); in launchSimpleSaveActivity() 129 activity.finish(); in launchSimpleSaveActivity() [all …]
|
D | TimePickerTestCase.java | 46 final T activity = getTimePickerActivity(); in testAutoFillAndSave() local 65 activity.expectAutoFill("4:20", 4, 20); in testAutoFillAndSave() 68 activity.onOutput((v) -> v.requestFocus()); in testAutoFillAndSave() 78 activity.assertAutoFilled(); in testAutoFillAndSave() 81 activity.setTime(10, 40); in testAutoFillAndSave() 82 activity.tapOk(); in testAutoFillAndSave()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/ |
D | PassFailButtons.java | 272 void setPassFailClickListeners(final T activity) { in setPassFailClickListeners() argument 276 setTestResultAndFinish(activity, activity.getTestId(), activity.getTestDetails(), in setPassFailClickListeners() 277 activity.getReportLog(), target); in setPassFailClickListeners() 281 View passButton = activity.findViewById(R.id.pass_button); in setPassFailClickListeners() 286 Toast.makeText(activity, R.string.pass_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners() 291 View failButton = activity.findViewById(R.id.fail_button); in setPassFailClickListeners() 296 Toast.makeText(activity, R.string.fail_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners() 302 protected static void setInfo(final android.app.Activity activity, final int titleId, in setInfo() argument 305 View infoButton = activity.findViewById(R.id.info_button); in setInfo() 310 showInfoDialog(activity, titleId, messageId, viewId); in setInfo() [all …]
|
D | TestResult.java | 48 public static void setPassedResult(Activity activity, String testId, String testDetails) { in setPassedResult() argument 49 setPassedResult(activity, testId, testDetails, null /*reportLog*/); in setPassedResult() 53 public static void setPassedResult(Activity activity, String testId, String testDetails, in setPassedResult() argument 55 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_PASSED, testId, in setPassedResult() 60 public static void setFailedResult(Activity activity, String testId, String testDetails) { in setFailedResult() argument 61 setFailedResult(activity, testId, testDetails, null /*reportLog*/); in setFailedResult() 65 public static void setFailedResult(Activity activity, String testId, String testDetails, in setFailedResult() argument 67 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_FAILED, testId, in setFailedResult() 71 private static Intent createResult(Activity activity, int testResult, String testName, in createResult() argument 73 Intent data = new Intent(activity, activity.getClass()); in createResult()
|
/cts/tests/app/app/src/android/app/stubs/ |
D | OrientationTestUtils.java | 34 public static void toggleOrientation(Activity activity) { in toggleOrientation() argument 35 final int[] orientations = getOrientations(activity); in toggleOrientation() 36 activity.setRequestedOrientation(orientations[1]); in toggleOrientation() 37 activity.setRequestedOrientation(orientations[0]); in toggleOrientation() 46 public static void switchOrientation(final Activity activity) { in switchOrientation() argument 47 final int[] orientations = getOrientations(activity); in switchOrientation() 48 activity.setRequestedOrientation(orientations[1]); in switchOrientation() 57 private static int[] getOrientations(final Activity activity) { in getOrientations() argument 58 final int originalOrientation = activity.getResources().getConfiguration().orientation; in getOrientations()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | View_IdsTest.java | 46 Activity activity; in testIds() local 47 activity = mActivityRule.getActivity(); in testIds() 49 EditText editText = (EditText) activity.findViewById(R.id.entry); in testIds() 50 Button buttonOk = (Button) activity.findViewById(R.id.ok); in testIds() 51 Button buttonCancel = (Button) activity.findViewById(R.id.cancel); in testIds() 52 TextView symbol = (TextView) activity.findViewById(R.id.symbolball); in testIds() 53 TextView warning = (TextView) activity.findViewById(R.id.warning); in testIds() 61 assertEquals(activity.getString(R.string.id_ok), buttonOk.getText().toString()); in testIds() 62 assertEquals(activity.getString(R.string.id_cancel), buttonCancel.getText().toString()); in testIds() 66 assertSame(editText, (EditText) activity.findViewById(0x1111)); in testIds() [all …]
|
D | View_InitialFocusTest.java | 51 Activity activity = mActivityRule.getActivity(); in setup() local 53 activity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)); in setup() 60 final Activity activity = mActivityRule.getActivity(); in getInitialAndFirstFocus() local 61 mActivityRule.runOnUiThread(() -> activity.getLayoutInflater().inflate(res, in getInitialAndFirstFocus() 62 (ViewGroup) activity.findViewById(R.id.auto_test_area))); in getInitialAndFirstFocus() 64 View root = activity.findViewById(R.id.main_view); in getInitialAndFirstFocus() 73 Activity activity = mActivityRule.getActivity(); in testNoInitialFocus() local 76 assertSame(result[1], activity.findViewById(R.id.focusable1)); in testNoInitialFocus() 81 Activity activity = mActivityRule.getActivity(); in testDefaultFocus() local 84 assertSame(result[1], activity.findViewById(R.id.focusable2)); in testDefaultFocus() [all …]
|
D | View_FocusHandlingTest.java | 55 Activity activity = mActivityRule.getActivity(); in testFocusHandling() local 57 View v1 = activity.findViewById(R.id.view1); in testFocusHandling() 58 View v2 = activity.findViewById(R.id.view2); in testFocusHandling() 59 View v3 = activity.findViewById(R.id.view3); in testFocusHandling() 60 View v4 = activity.findViewById(R.id.view4); in testFocusHandling() 229 ViewGroup vg = (ViewGroup) activity.findViewById(R.id.auto_test_area); in testFocusHandling() 231 View sub = new View(activity); in testFocusHandling() 245 Activity activity = mActivityRule.getActivity(); in testEnabledHandling() local 247 View v1 = activity.findViewById(R.id.view1); in testEnabledHandling() 248 View v2 = activity.findViewById(R.id.view2); in testEnabledHandling() [all …]
|
D | TextureViewTest.java | 69 final TextureViewCtsActivity activity = mActivityRule.launchActivity(null); in testFirstFrames() local 70 activity.waitForEnterAnimationComplete(); in testFirstFrames() 75 View content = activity.findViewById(android.R.id.content); in testFirstFrames() 80 windowRet[0] = activity.getWindow(); in testFirstFrames() 86 activity.waitForSurface(); in testFirstFrames() 87 activity.initGl(); in testFirstFrames() 89 updatedCount = activity.waitForSurfaceUpdateCount(0); in testFirstFrames() 91 activity.drawColor(Color.GREEN); in testFirstFrames() 92 updatedCount = activity.waitForSurfaceUpdateCount(1); in testFirstFrames() 96 activity.findViewById(android.R.id.content), () -> activity.removeCover()); in testFirstFrames() [all …]
|
D | View_DefaultFocusHighlightTest.java | 54 Activity activity = mActivityRule.getActivity(); in testSettersAndGetters() local 60 View view = activity.findViewById(R.id.view); in testSettersAndGetters() 61 ListView listView = (ListView) activity.findViewById(R.id.listview); in testSettersAndGetters() 62 EditText editText = (EditText) activity.findViewById(R.id.edittext); in testSettersAndGetters() 63 Button button = (Button) activity.findViewById(R.id.button); in testSettersAndGetters() 64 LinearLayout linearLayout = (LinearLayout) activity.findViewById(R.id.linearlayout); in testSettersAndGetters() 88 Activity activity = mActivityRule.getActivity(); in testInflating() local 94 View view = activity.findViewById(R.id.view_to_inflate); in testInflating() 95 ListView listView = (ListView) activity.findViewById(R.id.listview_to_inflate); in testInflating() 96 EditText editText = (EditText) activity.findViewById(R.id.edittext_to_inflate); in testInflating() [all …]
|
D | PixelCopyTest.java | 165 PixelCopyGLProducerCtsActivity activity = in waitForGlProducerActivity() local 167 activity.setSwapFence(swapFence); in waitForGlProducerActivity() 171 activity.getView().requestRender(); in waitForGlProducerActivity() 176 return activity; in waitForGlProducerActivity() 181 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerFullsize() local 183 int result = mCopyHelper.request(activity.getView(), bitmap); in testGlProducerFullsize() 194 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerCropTopLeft() local 196 int result = mCopyHelper.request(activity.getView(), new Rect(0, 0, 50, 50), bitmap); in testGlProducerCropTopLeft() 204 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerCropCenter() local 206 int result = mCopyHelper.request(activity.getView(), new Rect(25, 25, 75, 75), bitmap); in testGlProducerCropCenter() [all …]
|
/cts/tests/framework/base/activitymanager/src/android/server/am/ |
D | AspectRatioTestsBase.java | 38 final Activity activity = launchActivity(activityRule); in runAspectRatioTest() local 39 runTest(activity, callback); in runAspectRatioTest() 54 protected void runTest(Activity activity, AssertAspectRatioCallback callback) { in runTest() argument 55 callback.assertAspectRatio(getAspectRatio(activity)); in runTest() 69 final Activity activity = activityRule.launchActivity(null); in launchActivity() local 71 return activity; in launchActivity() 75 final Activity activity = activityRule.getActivity(); in finishActivity() local 76 if (activity != null) { in finishActivity() 77 activity.finish(); in finishActivity()
|
/cts/tests/fragment/src/android/fragment/cts/ |
D | LoaderTest.java | 60 LoaderActivity activity = FragmentTestUtil.recreateActivity(mActivityRule, in testLeak() local 63 FragmentManager fm = activity.getFragmentManager(); in testLeak() 81 activity = FragmentTestUtil.recreateActivity(mActivityRule, activity); in testLeak() 98 LoaderActivity activity = mActivityRule.getActivity(); in startWhenReused() local 99 activity.waitForResume(mActivityRule); in startWhenReused() 100 assertTrue(activity.loadFinished.await(1, TimeUnit.SECONDS)); in startWhenReused() 102 assertEquals("Loaded!", activity.textView.getText().toString()); in startWhenReused() 104 activity = FragmentTestUtil.recreateActivity(mActivityRule, activity); in startWhenReused() 105 assertTrue(activity.loadFinished.await(1, TimeUnit.SECONDS)); in startWhenReused() 108 assertEquals("Loaded!", activity.textView.getText().toString()); in startWhenReused() [all …]
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | Utils.java | 43 static TestListItem createInteractiveTestItem(Activity activity, String id, int titleRes, in createInteractiveTestItem() argument 45 return TestListItem.newTest(activity, titleRes, in createInteractiveTestItem() 46 id, new Intent(activity, IntentDrivenTestActivity.class) in createInteractiveTestItem() 54 static TestListItem createInteractiveTestItem(Activity activity, String id, int titleRes, in createInteractiveTestItem() argument 56 return createInteractiveTestItem(activity, id, titleRes, infoRes, in createInteractiveTestItem() 71 static void provisionManagedProfile(Activity activity, ComponentName admin, int requestCode) { in provisionManagedProfile() argument 74 if (sending.resolveActivity(activity.getPackageManager()) != null) { in provisionManagedProfile() 75 activity.startActivityForResult(sending, requestCode); in provisionManagedProfile() 77 showToast(activity, R.string.provisioning_byod_disabled); in provisionManagedProfile() 112 static void setScreenLock(Activity activity, int requestCode) { in setScreenLock() argument [all …]
|
/cts/hostsidetests/theme/app/src/android/theme/app/ |
D | ReferenceImagesTest.java | 38 final GenerateImagesActivity activity = getActivity(); in testGenerateReferenceImages() local 40 activity.waitForCompletion(TEST_RESULT_TIMEOUT)); in testGenerateReferenceImages() 41 assertTrue(activity.getFinishReason(), activity.isFinishSuccess()); in testGenerateReferenceImages() 43 final File outputZip = activity.getOutputZip(); in testGenerateReferenceImages()
|
/cts/tests/tests/mediastress/src/android/mediastress/cts/ |
D | NativeMediaTest.java | 68 final NativeMediaActivity activity = getActivity(); in runPlayTest() local 70 waitForNativeMediaLifeCycle(activity, true); in runPlayTest() 74 instrumentation.callActivityOnPause(activity); in runPlayTest() 77 waitForNativeMediaLifeCycle(activity, false); in runPlayTest() 79 instrumentation.callActivityOnResume(activity); in runPlayTest() 81 waitForNativeMediaLifeCycle(activity, true); in runPlayTest() 92 private void waitForNativeMediaLifeCycle(NativeMediaActivity activity, boolean expectAlive) in waitForNativeMediaLifeCycle() argument 94 Boolean status = activity.waitForNativeMediaLifeCycle(); in waitForNativeMediaLifeCycle()
|
/cts/tests/app/src/android/app/cts/ |
D | TaskDescriptionTest.java | 63 final Activity activity = mTaskDescriptionActivity.launchActivity(null); in testBitmapConstructor() local 66 activity.setTaskDescription(new TaskDescription(TEST_LABEL, bitmap, TEST_COLOR)); in testBitmapConstructor() 67 assertTaskDescription(activity, TEST_LABEL, TEST_NO_DATA); in testBitmapConstructor() 72 final Activity activity = mTaskDescriptionActivity.launchActivity(null); in testResourceConstructor() local 73 activity.setTaskDescription(new TaskDescription(TEST_LABEL, TEST_RES_DATA, TEST_COLOR)); in testResourceConstructor() 74 assertTaskDescription(activity, TEST_LABEL, TEST_RES_DATA); in testResourceConstructor() 77 private void assertTaskDescription(Activity activity, String label, int resId) { in assertTaskDescription() argument 78 final ActivityManager am = (ActivityManager) activity.getSystemService(ACTIVITY_SERVICE); in assertTaskDescription() 82 if (activity.getTaskId() == info.id) { in assertTaskDescription() 97 fail("Did not find activity (id=" + activity.getTaskId() + ") in recent tasks list"); in assertTaskDescription()
|
/cts/tests/fragment/sdk26/src/android/fragment/cts/sdk26/ |
D | FragmentManagerNonConfigTest.java | 49 final NonConfigOnStopActivity activity = mActivityRule.getActivity(); in nonConfigStop() local 50 activity.sDestroyed = new CountDownLatch(1); in nonConfigStop() 51 activity.sResumed = new CountDownLatch(1); in nonConfigStop() 52 mActivityRule.runOnUiThread(() -> activity.recreate()); in nonConfigStop() 55 assertTrue(activity.sDestroyed.await(1, TimeUnit.SECONDS)); in nonConfigStop() 56 assertTrue(activity.sResumed.await(1, TimeUnit.SECONDS)); in nonConfigStop()
|
/cts/tests/openglperf2/src/android/opengl2/cts/reference/ |
D | GLReferenceBenchmark.java | 47 GLReferenceActivity activity = null; in testReferenceBenchmark() local 49 activity = getActivity(); in testReferenceBenchmark() 50 if (activity != null) { in testReferenceBenchmark() 51 activity.waitForCompletion(); in testReferenceBenchmark() 53 double[] setUpTimes = activity.mSetUpTimes; in testReferenceBenchmark() 54 double[] updateTimes = activity.mUpdateTimes; in testReferenceBenchmark() 55 double[] renderTimes = activity.mRenderTimes; in testReferenceBenchmark()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/location/base/ |
D | EmergencyCallUtil.java | 49 public static void setDefaultDialer(Activity activity, String packageName) { in setDefaultDialer() argument 52 activity.startActivityForResult(intent, REQUEST_CODE_SET_DEFAULT_DIALER); in setDefaultDialer() 55 public static void makePhoneCall(Activity activity, int phoneNumber) { in makePhoneCall() argument 60 activity.startActivityForResult(callIntent, REQUEST_CODE_SET_DEFAULT_DIALER); in makePhoneCall() 65 activity.runOnUiThread(new Runnable() { in makePhoneCall() 92 public static boolean isPhoneDevice(Activity activity) { in isPhoneDevice() argument 94 (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); in isPhoneDevice() 123 private static String getCurrentPhoneNumber(Activity activity) { in getCurrentPhoneNumber() argument 125 (TelephonyManager)activity.getSystemService(Context.TELEPHONY_SERVICE); in getCurrentPhoneNumber()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/os/ |
D | TimeoutResetActivity.java | 69 public static void turnOffScreen(final Activity activity) { in turnOffScreen() argument 70 activity.runOnUiThread(new Runnable() { in turnOffScreen() 73 WindowManager.LayoutParams params = activity.getWindow().getAttributes(); in turnOffScreen() 82 activity.getWindow().setAttributes(params); in turnOffScreen() 84 ((AlarmManager) activity.getSystemService(ALARM_SERVICE)).setExact( in turnOffScreen() 88 activity.getApplicationContext(), in turnOffScreen() 90 new Intent(activity, TimeoutResetActivity.class) in turnOffScreen()
|
/cts/tests/framework/base/activitymanager/util/src/android/server/am/ |
D | ActivityManagerState.java | 319 for (Activity activity : task.mActivities) { in getStackIndexByActivity() 320 if (activity.name.equals(fullName)) { in getStackIndexByActivity() 355 for (Activity activity : task.mActivities) { in containsActivity() 356 if (activity.name.equals(fullName)) { in containsActivity() 369 for (Activity activity : task.mActivities) { in containsActivityInWindowingMode() 370 if (activity.name.equals(fullName) in containsActivityInWindowingMode() 371 && activity.getWindowingMode() == windowingMode) { in containsActivityInWindowingMode() 384 for (Activity activity : task.mActivities) { in isActivityVisible() 385 if (activity.name.equals(fullName)) { in isActivityVisible() 386 return activity.visible; in isActivityVisible() [all …]
|
/cts/tests/tests/systemui/src/android/systemui/cts/ |
D | LightBarTestBase.java | 43 protected Bitmap takeStatusBarScreenshot(LightBarBaseActivity activity) { in takeStatusBarScreenshot() argument 45 return Bitmap.createBitmap(fullBitmap, 0, 0, activity.getWidth(), activity.getTop()); in takeStatusBarScreenshot() 48 protected Bitmap takeNavigationBarScreenshot(LightBarBaseActivity activity) { in takeNavigationBarScreenshot() argument 50 return Bitmap.createBitmap(fullBitmap, 0, activity.getBottom(), activity.getWidth(), in takeNavigationBarScreenshot() 51 fullBitmap.getHeight() - activity.getBottom()); in takeNavigationBarScreenshot() 118 protected void checkNavigationBarDivider(LightBarBaseActivity activity, int dividerColor) { in checkNavigationBarDivider() argument 119 final Bitmap bitmap = takeNavigationBarScreenshot(activity); in checkNavigationBarDivider()
|
/cts/tools/cts-holo-generation/src/com/android/cts/holo_capture/ |
D | CaptureHolo.java | 30 CaptureActivity activity = getActivity(); in testCaptureHolo() local 32 (KeyguardManager) activity.getSystemService(Context.KEYGUARD_SERVICE); in testCaptureHolo() 34 activity.waitForCompletion(); in testCaptureHolo()
|