Home
last modified time | relevance | path

Searched refs:activity (Results 1 – 25 of 207) sorted by relevance

123456789

/cts/hostsidetests/incident/apps/graphicsstatsapp/src/com/android/server/cts/device/graphicsstats/
DSimpleDrawFrameTests.java43 DrawFramesActivity activity = mActivityRule.getActivity(); in testDrawTenFrames() local
44 activity.waitForReady(); in testDrawTenFrames()
45 int initialFrames = activity.getRenderedFramesCount(); in testDrawTenFrames()
47 assertEquals(0, activity.getDroppedReportsCount()); in testDrawTenFrames()
48 activity.drawFrames(10); in testDrawTenFrames()
49 assertEquals(initialFrames + 10, activity.getRenderedFramesCount()); in testDrawTenFrames()
50 assertEquals(0, activity.getDroppedReportsCount()); in testDrawTenFrames()
55 DrawFramesActivity activity = mActivityRule.getActivity();
56 activity.waitForReady();
57 int initialFrames = activity.getRenderedFramesCount();
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DLayoutTests.java91 final TestActivity activity = startActivity(TestActivity.class); in testLayoutAfterRemovingFocus() local
96 activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(visibleFrame)); in testLayoutAfterRemovingFocus()
99 doTestLayoutAfterRemovingFocus(activity, visibleFrame, SYSTEM_UI_FLAG_FULLSCREEN); in testLayoutAfterRemovingFocus()
100 doTestLayoutAfterRemovingFocus(activity, visibleFrame, SYSTEM_UI_FLAG_HIDE_NAVIGATION); in testLayoutAfterRemovingFocus()
101 doTestLayoutAfterRemovingFocus(activity, visibleFrame, SYSTEM_UI_FLAG_HIDE_ALL); in testLayoutAfterRemovingFocus()
104 private void doTestLayoutAfterRemovingFocus(TestActivity activity, in doTestLayoutAfterRemovingFocus() argument
108 final View view = new View(activity); in doTestLayoutAfterRemovingFocus()
110 activity.getWindowManager().addView(view, new LayoutParams(TYPE_APPLICATION_PANEL)); in doTestLayoutAfterRemovingFocus()
111 activity.mView = view; in doTestLayoutAfterRemovingFocus()
115 activity.waitForGlobalLayout(); in doTestLayoutAfterRemovingFocus()
[all …]
DAspectRatioTestsBase.java47 final Activity activity = launchActivity(activityRule); in runAspectRatioTest() local
48 PollingCheck.waitFor(activity::hasWindowFocus); in runAspectRatioTest()
50 callback.assertAspectRatio(getActivityAspectRatio(activity), in runAspectRatioTest()
51 getDisplay(activity).getDisplayId(), in runAspectRatioTest()
52 getActivitySize(activity)); in runAspectRatioTest()
80 private static float getActivityAspectRatio(Activity activity) { in getActivityAspectRatio() argument
81 return getAspectRatio(getDisplay(activity)); in getActivityAspectRatio()
84 private static Point getActivitySize(Activity activity) { in getActivitySize() argument
86 getDisplay(activity).getSize(size); in getActivitySize()
90 private static Display getDisplay(Activity activity) { in getDisplay() argument
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/
DAutofillTestWatcher.java81 @NonNull AbstractAutoFillActivity activity) { in registerActivity() argument
83 if (sUnfinishedBusiness.contains(activity)) { in registerActivity()
84 throw new IllegalStateException("Already registered " + activity); in registerActivity()
86 Log.v(TAG, "registering activity on " + where + ": " + activity); in registerActivity()
87 sUnfinishedBusiness.add(activity); in registerActivity()
88 sAllActivities.add(activity); in registerActivity()
91 sAllActivities.add(activity); in registerActivity()
100 @NonNull AbstractAutoFillActivity activity) { in unregisterActivity() argument
102 final boolean unregistered = sUnfinishedBusiness.remove(activity); in unregisterActivity()
104 Log.d(TAG, "unregistered activity on " + where + ": " + activity); in unregisterActivity()
[all …]
DDisableAutofillTest.java91 final SimpleSaveActivity activity = startSimpleSaveActivity(); in launchSimpleSaveActivity() local
92 final MyAutofillCallback callback = activity.registerCallback(); in launchSimpleSaveActivity()
96 activity.syncRunOnUiThread(() -> activity.mInput.requestFocus()); in launchSimpleSaveActivity()
99 callback.assertUiUnavailableEvent(activity.mInput); in launchSimpleSaveActivity()
103 activity.syncRunOnUiThread(() -> activity.mPassword.requestFocus()); in launchSimpleSaveActivity()
107 activity.getAutofillManager().requestAutofill(activity.mInput); in launchSimpleSaveActivity()
110 callback.assertUiShownEvent(activity.mInput); in launchSimpleSaveActivity()
113 activity.expectAutoFill("id", "pass"); in launchSimpleSaveActivity()
119 assertAutofillEnabled(activity, action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL); in launchSimpleSaveActivity()
121 activity.finish(); in launchSimpleSaveActivity()
[all …]
/cts/tests/app/app/src/android/app/stubs/
DActivityCallbacksTestActivity.java71 public void onActivityPreCreated(Activity activity, Bundle savedInstanceState) { in ActivityCallbacksTestActivity()
76 public void onActivityCreated(Activity activity, Bundle savedInstanceState) { in ActivityCallbacksTestActivity()
81 public void onActivityPostCreated(Activity activity, Bundle savedInstanceState) { in ActivityCallbacksTestActivity()
86 public void onActivityPreStarted(Activity activity) { in ActivityCallbacksTestActivity()
91 public void onActivityStarted(Activity activity) { in ActivityCallbacksTestActivity()
96 public void onActivityPostStarted(Activity activity) { in ActivityCallbacksTestActivity()
101 public void onActivityPreResumed(Activity activity) { in ActivityCallbacksTestActivity()
106 public void onActivityResumed(Activity activity) { in ActivityCallbacksTestActivity()
111 public void onActivityPostResumed(Activity activity) { in ActivityCallbacksTestActivity()
116 public void onActivityPrePaused(Activity activity) { in ActivityCallbacksTestActivity()
[all …]
DOrientationTestUtils.java34 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/common/device-side/util-axt/src/com/android/compatibility/common/util/
DActivitiesWatcher.java54 public void onActivityCreated(Activity activity, Bundle savedInstanceState) { in onActivityCreated() argument
55 Log.v(TAG, "onActivityCreated(): " + activity); in onActivityCreated()
56 notifyWatcher(activity, ActivityLifecycle.CREATED); in onActivityCreated()
60 public void onActivityStarted(Activity activity) { in onActivityStarted() argument
61 Log.v(TAG, "onActivityStarted(): " + activity); in onActivityStarted()
62 notifyWatcher(activity, ActivityLifecycle.STARTED); in onActivityStarted()
66 public void onActivityResumed(Activity activity) { in onActivityResumed() argument
67 Log.v(TAG, "onActivityResumed(): " + activity); in onActivityResumed()
68 notifyWatcher(activity, ActivityLifecycle.RESUMED); in onActivityResumed()
72 public void onActivityPaused(Activity activity) { in onActivityPaused() argument
[all …]
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DActivitiesWatcher.java54 public void onActivityCreated(Activity activity, Bundle savedInstanceState) { in onActivityCreated() argument
55 Log.v(TAG, "onActivityCreated(): " + activity); in onActivityCreated()
56 notifyWatcher(activity, ActivityLifecycle.CREATED); in onActivityCreated()
60 public void onActivityStarted(Activity activity) { in onActivityStarted() argument
61 Log.v(TAG, "onActivityStarted(): " + activity); in onActivityStarted()
62 notifyWatcher(activity, ActivityLifecycle.STARTED); in onActivityStarted()
66 public void onActivityResumed(Activity activity) { in onActivityResumed() argument
67 Log.v(TAG, "onActivityResumed(): " + activity); in onActivityResumed()
68 notifyWatcher(activity, ActivityLifecycle.RESUMED); in onActivityResumed()
72 public void onActivityPaused(Activity activity) { in onActivityPaused() argument
[all …]
/cts/tests/app/src/android/app/cts/
DActivityCallbacksTest.java94 public void onActivityPreCreated(Activity activity, Bundle savedInstanceState) { in testActivityCallbackOrder()
95 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
100 public void onActivityCreated(Activity activity, Bundle savedInstanceState) { in testActivityCallbackOrder()
101 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
106 public void onActivityPostCreated(Activity activity, Bundle savedInstanceState) { in testActivityCallbackOrder()
107 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
112 public void onActivityPreStarted(Activity activity) { in testActivityCallbackOrder()
113 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
118 public void onActivityStarted(Activity activity) { in testActivityCallbackOrder()
119 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DPassFailButtons.java272 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 …]
DTestResult.java48 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 public static Intent createResult(Activity activity, int testResult, String testName, in createResult() argument
73 Intent data = new Intent(activity, activity.getClass()); in createResult()
/cts/tests/tests/app.usage/src/android/app/usage/cts/
DUsageReportingTest.java74 Activity activity; in testUsageStartAndStopReporting() local
76 activity = Activities.startedActivities.valueAt(0); in testUsageStartAndStopReporting()
79 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageStartAndStopReporting()
82 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsageStartAndStopReporting()
86 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageStartAndStopReporting()
89 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsageStartAndStopReporting()
97 Activity activity; in testUsagePastReporting() local
99 activity = Activities.startedActivities.valueAt(0); in testUsagePastReporting()
102 mUsageStatsManager.reportUsageStart(activity, TOKEN_0, 100); in testUsagePastReporting()
105 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsagePastReporting()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DView_FocusHandlingTest.java56 Activity activity = mActivityRule.getActivity(); in testFocusHandling() local
58 View v1 = activity.findViewById(R.id.view1); in testFocusHandling()
59 View v2 = activity.findViewById(R.id.view2); in testFocusHandling()
60 View v3 = activity.findViewById(R.id.view3); in testFocusHandling()
61 View v4 = activity.findViewById(R.id.view4); in testFocusHandling()
230 ViewGroup vg = (ViewGroup) activity.findViewById(R.id.auto_test_area); in testFocusHandling()
232 View sub = new View(activity); in testFocusHandling()
246 Activity activity = mActivityRule.getActivity(); in testEnabledHandling() local
248 View v1 = activity.findViewById(R.id.view1); in testEnabledHandling()
249 View v2 = activity.findViewById(R.id.view2); in testEnabledHandling()
[all …]
DView_InitialFocusTest.java52 Activity activity = mActivityRule.getActivity(); in setup() local
54 activity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN)); in setup()
61 final Activity activity = mActivityRule.getActivity(); in getInitialAndFirstFocus() local
62 mActivityRule.runOnUiThread(() -> activity.getLayoutInflater().inflate(res, in getInitialAndFirstFocus()
63 (ViewGroup) activity.findViewById(R.id.auto_test_area))); in getInitialAndFirstFocus()
65 View root = activity.findViewById(R.id.main_view); in getInitialAndFirstFocus()
74 Activity activity = mActivityRule.getActivity(); in testNoInitialFocus() local
77 assertSame(result[1], activity.findViewById(R.id.focusable1)); in testNoInitialFocus()
82 Activity activity = mActivityRule.getActivity(); in testDefaultFocus() local
85 assertSame(result[1], activity.findViewById(R.id.focusable2)); in testDefaultFocus()
[all …]
DView_IdsTest.java47 Activity activity; in testIds() local
48 activity = mActivityRule.getActivity(); in testIds()
50 EditText editText = (EditText) activity.findViewById(R.id.entry); in testIds()
51 Button buttonOk = (Button) activity.findViewById(R.id.ok); in testIds()
52 Button buttonCancel = (Button) activity.findViewById(R.id.cancel); in testIds()
53 TextView symbol = (TextView) activity.findViewById(R.id.symbolball); in testIds()
54 TextView warning = (TextView) activity.findViewById(R.id.warning); in testIds()
62 assertEquals(activity.getString(R.string.id_ok), buttonOk.getText().toString()); in testIds()
63 assertEquals(activity.getString(R.string.id_cancel), buttonCancel.getText().toString()); in testIds()
67 assertSame(editText, (EditText) activity.findViewById(0x1111)); in testIds()
[all …]
DTextureViewTest.java76 final TextureViewCtsActivity activity = mActivityRule.launchActivity(null); in testFirstFrames() local
77 activity.waitForEnterAnimationComplete(); in testFirstFrames()
82 View content = activity.findViewById(android.R.id.content); in testFirstFrames()
87 windowRet[0] = activity.getWindow(); in testFirstFrames()
93 activity.waitForSurface(); in testFirstFrames()
94 activity.initGl(); in testFirstFrames()
96 updatedCount = activity.waitForSurfaceUpdateCount(0); in testFirstFrames()
98 activity.drawColor(Color.GREEN); in testFirstFrames()
99 updatedCount = activity.waitForSurfaceUpdateCount(1); in testFirstFrames()
103 activity.findViewById(android.R.id.content), () -> activity.removeCover()); in testFirstFrames()
[all …]
DPixelCopyTest.java169 PixelCopyGLProducerCtsActivity activity = in waitForGlProducerActivity() local
171 activity.setSwapFence(swapFence); in waitForGlProducerActivity()
175 activity.getView().requestRender(); in waitForGlProducerActivity()
180 return activity; in waitForGlProducerActivity()
185 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerFullsize() local
187 int result = mCopyHelper.request(activity.getView(), bitmap); in testGlProducerFullsize()
198 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerCropTopLeft() local
200 int result = mCopyHelper.request(activity.getView(), new Rect(0, 0, 50, 50), bitmap); in testGlProducerCropTopLeft()
208 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerCropCenter() local
210 int result = mCopyHelper.request(activity.getView(), new Rect(25, 25, 75, 75), bitmap); in testGlProducerCropCenter()
[all …]
DView_DefaultFocusHighlightTest.java55 Activity activity = mActivityRule.getActivity(); in testSettersAndGetters() local
61 View view = activity.findViewById(R.id.view); in testSettersAndGetters()
62 ListView listView = (ListView) activity.findViewById(R.id.listview); in testSettersAndGetters()
63 EditText editText = (EditText) activity.findViewById(R.id.edittext); in testSettersAndGetters()
64 Button button = (Button) activity.findViewById(R.id.button); in testSettersAndGetters()
65 LinearLayout linearLayout = (LinearLayout) activity.findViewById(R.id.linearlayout); in testSettersAndGetters()
89 Activity activity = mActivityRule.getActivity(); in testInflating() local
95 View view = activity.findViewById(R.id.view_to_inflate); in testInflating()
96 ListView listView = (ListView) activity.findViewById(R.id.listview_to_inflate); in testInflating()
97 EditText editText = (EditText) activity.findViewById(R.id.edittext_to_inflate); in testInflating()
[all …]
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DCustomViewActivityTest.java97 final CustomViewActivity activity = launchActivity(); in testLifecycle() local
100 activity.finish(); in testLifecycle()
106 activity.assertDefaultEvents(session); in testLifecycle()
136 final CustomViewActivity activity = launchActivity(); in testVirtualView_wrongWay() local
139 activity.finish(); in testVirtualView_wrongWay()
145 assertRightActivity(session, session.id, activity); in testVirtualView_wrongWay()
147 final View grandpa1 = (View) activity.mCustomView.getParent(); in testVirtualView_wrongWay()
149 final View decorView = activity.getDecorView(); in testVirtualView_wrongWay()
150 final AutofillId customViewId = activity.mCustomView.getAutofillId(); in testVirtualView_wrongWay()
164 final ContentCaptureSession mainSession = activity.mCustomView.getContentCaptureSession(); in testVirtualView_wrongWay()
[all …]
/cts/tests/fragment/src/android/fragment/cts/
DLoaderTest.java61 LoaderActivity activity = FragmentTestUtil.recreateActivity(mActivityRule, in testLeak() local
64 FragmentManager fm = activity.getFragmentManager(); in testLeak()
82 activity = FragmentTestUtil.recreateActivity(mActivityRule, activity); in testLeak()
99 LoaderActivity activity = mActivityRule.getActivity(); in startWhenReused() local
100 activity.waitForResume(mActivityRule); in startWhenReused()
101 assertTrue(activity.loadFinished.await(1, TimeUnit.SECONDS)); in startWhenReused()
103 assertEquals("Loaded!", activity.textView.getText().toString()); in startWhenReused()
105 activity = FragmentTestUtil.recreateActivity(mActivityRule, activity); in startWhenReused()
106 assertTrue(activity.loadFinished.await(1, TimeUnit.SECONDS)); in startWhenReused()
109 assertEquals("Loaded!", activity.textView.getText().toString()); in startWhenReused()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DUtils.java45 static TestListItem createInteractiveTestItem(Activity activity, String id, int titleRes, in createInteractiveTestItem() argument
47 return TestListItem.newTest(activity, titleRes, in createInteractiveTestItem()
48 id, new Intent(activity, IntentDrivenTestActivity.class) in createInteractiveTestItem()
56 static TestListItem createInteractiveTestItem(Activity activity, String id, int titleRes, in createInteractiveTestItem() argument
58 return createInteractiveTestItem(activity, id, titleRes, infoRes, in createInteractiveTestItem()
73 static void provisionManagedProfile(Activity activity, ComponentName admin, int requestCode) { in provisionManagedProfile() argument
76 if (sending.resolveActivity(activity.getPackageManager()) != null) { in provisionManagedProfile()
77 activity.startActivityForResult(sending, requestCode); in provisionManagedProfile()
79 showToast(activity, R.string.provisioning_byod_disabled); in provisionManagedProfile()
114 static void setScreenLock(Activity activity, int requestCode) { in setScreenLock() argument
[all …]
/cts/hostsidetests/testharness/app/src/android/testharness/app/
DTestHarnessModeDeviceTest.java44 TestHarnessActivity activity = mActivityRule.getActivity(); in ensureActivityNotObscuredByKeyboardSetUpScreen() local
45 PollingCheck.waitFor(activity::isKeyboardVisible); in ensureActivityNotObscuredByKeyboardSetUpScreen()
53 TestHarnessActivity activity = mActivityRule.getActivity(); in dirtyDevice() local
54 PollingCheck.waitFor(activity::hasWindowFocus); in dirtyDevice()
56 activity.dirtyDevice(); in dirtyDevice()
61 TestHarnessActivity activity = mActivityRule.getActivity(); in testDeviceIsClean() local
62 PollingCheck.waitFor(activity::hasWindowFocus); in testDeviceIsClean()
64 Assert.assertTrue(activity.isDeviceClean()); in testDeviceIsClean()
/cts/tests/framework/base/windowmanager/src/android/server/wm/intent/
DLaunchRunner.java190 Activity activity = launch(activityLog.get(launchFromIntent.getLaunchFrom()), in run() local
192 activityLog.add(activity); in run()
201 Activity activity = launch(activityLog.get(launchFromIntent.getLaunchFrom()), in run() local
204 activityLog.add(activity); in run()
248 Activity activity = monitor.waitForActivityWithTimeout(ACTIVITY_LAUNCH_TIMEOUT); in launchFromContext() local
249 waitAndAssertActivityLaunched(activity, intent); in launchFromContext()
251 return activity; in launchFromContext()
263 Activity activity = monitor.waitForActivityWithTimeout(ACTIVITY_LAUNCH_TIMEOUT); in launch() local
265 if (activity == null) { in launch()
268 waitAndAssertActivityLaunched(activity, intent); in launch()
[all …]
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DNativeMediaTest.java68 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()

123456789