Home
last modified time | relevance | path

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

1234567891011

/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DLoginActivityTest.java107 final LoginActivity activity = launchActivity(); in testSimpleLifecycle_defaultSession() local
110 activity.finish(); in testSimpleLifecycle_defaultSession()
116 activity.assertDefaultEvents(session); in testSimpleLifecycle_defaultSession()
118 final ComponentName name = activity.getComponentName(); in testSimpleLifecycle_defaultSession()
134 LoginActivity.onRootView((activity, rootView) -> { in testContentCaptureSessionCache() argument
152 final LoginActivity activity = launchActivity(); in testContentCaptureSessionCache() local
155 activity.finish(); in testContentCaptureSessionCache()
161 assertSessionId(childSessionId, activity.getRootView()); in testContentCaptureSessionCache()
174 LoginActivity.onRootView((activity, rootView) -> { in testSimpleLifecycle_rootViewSession() argument
184 final LoginActivity activity = launchActivity(); in testSimpleLifecycle_rootViewSession() local
[all …]
DLoginActivity.java99 final LoginActivity activity = this; in assertJustInitialViewsAppeared() local
101 assertRightActivity(session, sessionId, activity); in assertJustInitialViewsAppeared()
104 assertSessionId(sessionId, activity.mUsernameLabel); in assertJustInitialViewsAppeared()
105 assertSessionId(sessionId, activity.mUsername); in assertJustInitialViewsAppeared()
106 assertSessionId(sessionId, activity.mPassword); in assertJustInitialViewsAppeared()
107 assertSessionId(sessionId, activity.mPasswordLabel); in assertJustInitialViewsAppeared()
116 final AutofillId rootId = activity.getRootView().getAutofillId(); in assertJustInitialViewsAppeared()
121 final View grandpa1 = activity.getGrandParent(); in assertJustInitialViewsAppeared()
122 final View grandpa2 = activity.getGrandGrandParent(); in assertJustInitialViewsAppeared()
123 final View decorView = activity.getDecorView(); in assertJustInitialViewsAppeared()
[all …]
DCustomViewActivityTest.java101 final CustomViewActivity activity = launchActivity(); in testLifecycle() local
104 activity.finish(); in testLifecycle()
110 activity.assertDefaultEvents(session); in testLifecycle()
129 final CustomViewActivity activity = launchActivity(); in testSessionLifecycleEvents() local
132 activity.finish(); in testSessionLifecycleEvents()
138 assertRightActivity(session, session.id, activity); in testSessionLifecycleEvents()
140 final View grandpa1 = (View) activity.mCustomView.getParent(); in testSessionLifecycleEvents()
142 final View decorView = activity.getDecorView(); in testSessionLifecycleEvents()
143 final AutofillId customViewId = activity.mCustomView.getAutofillId(); in testSessionLifecycleEvents()
169 activity.assertInitialViewsDisappeared(events, additionalEvents); in testSessionLifecycleEvents()
[all …]
DChildlessActivityTest.java105 final ChildlessActivity activity = launchActivity(); in testDefaultLifecycle() local
108 activity.finish(); in testDefaultLifecycle()
114 activity.assertDefaultEvents(session); in testDefaultLifecycle()
121 final ChildlessActivity activity = launchActivity(); in testGetContentCapture_disabledWhenNoService() local
124 assertThat(activity.getContentCaptureManager().isContentCaptureEnabled()).isFalse(); in testGetContentCapture_disabledWhenNoService()
126 activity.finish(); in testGetContentCapture_disabledWhenNoService()
135 final ChildlessActivity activity = launchActivity(); in testGetContentCapture_enabledWhenNoService() local
138 assertThat(activity.getContentCaptureManager().isContentCaptureEnabled()).isTrue(); in testGetContentCapture_enabledWhenNoService()
140 activity.finish(); in testGetContentCapture_enabledWhenNoService()
247 ChildlessActivity.onRootView((activity, rootView) -> { in testAddAndRemoveNoImportantChild() argument
[all …]
DBlankActivityTest.java78 final BlankActivity activity = launchActivity(); in testSimpleSessionLifecycle() local
81 activity.finish(); in testSimpleSessionLifecycle()
87 activity.assertDefaultEvents(session); in testSimpleSessionLifecycle()
97 final BlankActivity activity = launchActivity(); in testGetServiceComponentName() local
101 assertThat(activity.getContentCaptureManager().getServiceComponentName()) in testGetServiceComponentName()
107 assertThat(activity.getContentCaptureManager().getServiceComponentName()) in testGetServiceComponentName()
110 activity.finish(); in testGetServiceComponentName()
122 final BlankActivity activity = launchActivity(); in testGetServiceComponentName_onUiThread() local
126 activity.syncRunOnUiThread( in testGetServiceComponentName_onUiThread()
127 () -> ref.set(activity.getContentCaptureManager().getServiceComponentName())); in testGetServiceComponentName_onUiThread()
[all …]
/cts/tests/app/src/android/app/cts/
DActivityCallbacksTest.java94 public void onActivityPreCreated(Activity activity, Bundle savedInstanceState) { in testActivityCallbackOrder()
95 if (!wanted(activity)) return; in testActivityCallbackOrder()
96 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
101 public void onActivityCreated(Activity activity, Bundle savedInstanceState) { in testActivityCallbackOrder()
102 if (!wanted(activity)) return; in testActivityCallbackOrder()
103 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
108 public void onActivityPostCreated(Activity activity, Bundle savedInstanceState) { in testActivityCallbackOrder()
109 if (!wanted(activity)) return; in testActivityCallbackOrder()
110 ActivityCallbacksTestActivity a = (ActivityCallbacksTestActivity) activity; in testActivityCallbackOrder()
115 public void onActivityPreStarted(Activity activity) { in testActivityCallbackOrder()
[all …]
DTaskDescriptionTest.java65 final Activity activity = mTaskDescriptionActivity.launchActivity(null); in testBitmapConstructor() local
68 activity.setTaskDescription(new TaskDescription(TEST_LABEL, bitmap, TEST_COLOR)); in testBitmapConstructor()
69 assertTaskDescription(activity, TEST_LABEL, TEST_NO_DATA, bitmap); in testBitmapConstructor()
71 activity.setTaskDescription(new TaskDescription(TEST_LABEL, bitmap)); in testBitmapConstructor()
72 assertTaskDescription(activity, TEST_LABEL, TEST_NO_DATA, bitmap); in testBitmapConstructor()
77 final Activity activity = mTaskDescriptionActivity.launchActivity(null); in testResourceConstructor() local
78 activity.setTaskDescription(new TaskDescription(TEST_LABEL, TEST_RES_DATA, TEST_COLOR)); in testResourceConstructor()
79 assertTaskDescription(activity, TEST_LABEL, TEST_RES_DATA, null); in testResourceConstructor()
81 activity.setTaskDescription(new TaskDescription(TEST_LABEL, TEST_RES_DATA)); in testResourceConstructor()
82 assertTaskDescription(activity, TEST_LABEL, TEST_RES_DATA, null); in testResourceConstructor()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DLayoutTests.java94 final TestActivity activity = startActivity(TestActivity.class); in testLayoutAfterRemovingFocus() local
99 activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(visibleFrame)); in testLayoutAfterRemovingFocus()
102 doTestLayoutAfterRemovingFocus(activity, visibleFrame, SYSTEM_UI_FLAG_FULLSCREEN); in testLayoutAfterRemovingFocus()
103 doTestLayoutAfterRemovingFocus(activity, visibleFrame, SYSTEM_UI_FLAG_HIDE_NAVIGATION); in testLayoutAfterRemovingFocus()
104 doTestLayoutAfterRemovingFocus(activity, visibleFrame, SYSTEM_UI_FLAG_HIDE_ALL); in testLayoutAfterRemovingFocus()
107 private void doTestLayoutAfterRemovingFocus(TestActivity activity, in doTestLayoutAfterRemovingFocus() argument
111 final View view = new View(activity); in doTestLayoutAfterRemovingFocus()
113 activity.addWindow(view, new LayoutParams()); in doTestLayoutAfterRemovingFocus()
117 activity.waitForGlobalLayout(); in doTestLayoutAfterRemovingFocus()
120 getInstrumentation().runOnMainSync(activity::removeAllWindows); in doTestLayoutAfterRemovingFocus()
[all …]
DDecorInsetTests.java40 TestActivity activity = mDecorActivity.launchActivity(new Intent() in testDecorView_consumesAllInsets_byDefault() local
45 activity.mLaidOut.await(4, TimeUnit.SECONDS); in testDecorView_consumesAllInsets_byDefault()
47 assertNotNull("test setup failed", activity.mLastDecorInsets); in testDecorView_consumesAllInsets_byDefault()
48 assertNull("unexpected content insets", activity.mLastContentInsets); in testDecorView_consumesAllInsets_byDefault()
55 TestActivity activity = mDecorActivity.launchActivity(new Intent() in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet() local
60 activity.mLaidOut.await(4, TimeUnit.SECONDS); in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet()
62 assertNotNull("test setup failed", activity.mLastDecorInsets); in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet()
63 assertEquals("unexpected bottom inset: ", 0, activity.mLastContentInsets.getInsets( in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet()
71 TestActivity activity = mDecorActivity.launchActivity(new Intent() in testDecorView_doesntConsumeNavBar_ifLayoutHideNavIsSet() local
76 activity.mLaidOut.await(4, TimeUnit.SECONDS); in testDecorView_doesntConsumeNavBar_ifLayoutHideNavIsSet()
[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 …]
DWindowInsetsLayoutTests.java60 final TestActivity activity = startActivity(TestActivity.class); in testSetFitInsetsTypes() local
63 final View mainWindowRoot = activity.getWindow().getDecorView(); in testSetFitInsetsTypes()
67 activity.assertMatchDisplay(); in testSetFitInsetsTypes()
70 testSetFitInsetsTypesInner(Type.statusBars(), activity, mainWindowRoot); in testSetFitInsetsTypes() local
71 testSetFitInsetsTypesInner(Type.navigationBars(), activity, mainWindowRoot); in testSetFitInsetsTypes() local
72 testSetFitInsetsTypesInner(Type.systemBars(), activity, mainWindowRoot); in testSetFitInsetsTypes() local
76 int types, TestActivity activity, View mainWindowRoot) { in testSetFitInsetsTypesInner() argument
78 activity.addChildWindow(types, Side.all(), false); in testSetFitInsetsTypesInner()
82 final View childWindowRoot = activity.getChildWindowRoot(); in testSetFitInsetsTypesInner()
96 activity.removeChildWindow(); in testSetFitInsetsTypesInner()
[all …]
DWindowMetricsTests.java61 final MetricsActivity activity = mMetricsActivity.launchActivity(null); in testMetricsSanity() local
62 activity.waitForLayout(); in testMetricsSanity()
64 assertEquals(activity.mOnLayoutBounds, activity.mOnCreateCurrentMetrics.getBounds()); in testMetricsSanity()
65 assertTrue(activity.mOnCreateMaximumMetrics.getBounds().width() in testMetricsSanity()
66 >= activity.mOnCreateCurrentMetrics.getBounds().width()); in testMetricsSanity()
67 assertTrue(activity.mOnCreateMaximumMetrics.getBounds().height() in testMetricsSanity()
68 >= activity.mOnCreateCurrentMetrics.getBounds().height()); in testMetricsSanity()
70 assertEquals(activity.mOnLayoutInsets.getSystemWindowInsets(), in testMetricsSanity()
71 activity.mOnCreateCurrentMetrics.getWindowInsets().getSystemWindowInsets()); in testMetricsSanity()
72 assertEquals(activity.mOnLayoutInsets.getStableInsets(), in testMetricsSanity()
[all …]
/cts/tests/framework/base/windowmanager/testsdk29/src/android/server/wm/
DDecorInsetSdk29Tests.java40 TestActivity activity = mDecorActivity.launchActivity(new Intent() in testDecorView_consumesAllInsets_byDefault() local
45 activity.mLaidOut.await(4, TimeUnit.SECONDS); in testDecorView_consumesAllInsets_byDefault()
47 assertNotNull("test setup failed", activity.mLastDecorInsets); in testDecorView_consumesAllInsets_byDefault()
48 assertNull("unexpected content insets", activity.mLastContentInsets); in testDecorView_consumesAllInsets_byDefault()
55 TestActivity activity = mDecorActivity.launchActivity(new Intent() in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet() local
60 activity.mLaidOut.await(4, TimeUnit.SECONDS); in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet()
62 assertNotNull("test setup failed", activity.mLastDecorInsets); in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet()
63 assertEquals("unexpected bottom inset: ", 0, activity.mLastContentInsets.getInsets( in testDecorView_consumesNavBar_ifLayoutHideNavIsNotSet()
71 TestActivity activity = mDecorActivity.launchActivity(new Intent() in testDecorView_doesntConsumeNavBar_ifLayoutHideNavIsSet() local
76 activity.mLaidOut.await(4, TimeUnit.SECONDS); in testDecorView_doesntConsumeNavBar_ifLayoutHideNavIsSet()
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/
DAutofillTestWatcher.java90 @NonNull AbstractAutoFillActivity activity) { in registerActivity() argument
92 if (sUnfinishedBusiness.contains(activity)) { in registerActivity()
93 throw new IllegalStateException("Already registered " + activity); in registerActivity()
95 Log.v(TAG, "registering activity on " + where + ": " + activity); in registerActivity()
96 sUnfinishedBusiness.add(activity); in registerActivity()
97 sAllActivities.add(activity); in registerActivity()
100 sAllActivities.add(activity); in registerActivity()
109 @NonNull AbstractAutoFillActivity activity) { in unregisterActivity() argument
111 final boolean unregistered = sUnfinishedBusiness.remove(activity); in unregisterActivity()
113 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 …]
/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/apps/CtsVerifier/src/com/android/cts/verifier/
DPassFailButtons.java367 void setPassFailClickListeners(final T activity) { in setPassFailClickListeners() argument
371 setTestResultAndFinish(activity, activity.getTestId(), activity.getTestDetails(), in setPassFailClickListeners()
372 activity.getReportLog(), activity.getHistoryCollection(), target); in setPassFailClickListeners()
376 View passButton = activity.findViewById(R.id.pass_button); in setPassFailClickListeners()
381 Toast.makeText(activity, R.string.pass_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners()
386 View failButton = activity.findViewById(R.id.fail_button); in setPassFailClickListeners()
391 Toast.makeText(activity, R.string.fail_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners()
397 protected static void setInfo(final android.app.Activity activity, final int titleId, in setInfo() argument
400 View infoButton = activity.findViewById(R.id.info_button); in setInfo()
405 showInfoDialog(activity, titleId, messageId, viewId); in setInfo()
[all …]
DTestResult.java51 public static void setPassedResult(Activity activity, String testId, String testDetails) { in setPassedResult() argument
52 setPassedResult(activity, testId, testDetails, null /*reportLog*/); in setPassedResult()
56 public static void setPassedResult(Activity activity, String testId, String testDetails, in setPassedResult() argument
58 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_PASSED, testId, in setPassedResult()
63 public static void setPassedResult(Activity activity, String testId, String testDetails, in setPassedResult() argument
65 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_PASSED, testId, in setPassedResult()
70 public static void setFailedResult(Activity activity, String testId, String testDetails) { in setFailedResult() argument
71 setFailedResult(activity, testId, testDetails, null /*reportLog*/); in setFailedResult()
75 public static void setFailedResult(Activity activity, String testId, String testDetails, in setFailedResult() argument
77 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_FAILED, testId, in setFailedResult()
[all …]
/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 …]
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/
DBroadcastReceiverActivity.java105 TestBroadcastReceiver(Activity activity) { in TestBroadcastReceiver() argument
106 mAppContext = activity.getApplicationContext(); in TestBroadcastReceiver()
107 associate(activity); in TestBroadcastReceiver()
114 void associate(Activity activity) { in associate() argument
115 mRef = new WeakReference<>(activity); in associate()
119 final Activity activity = mRef != null ? mRef.get() : null; in destroy() local
120 if (activity != null && activity.isChangingConfigurations()) { in destroy()
139 final Activity activity = mRef.get(); in onReceive() local
140 if (activity == null) { in onReceive()
145 activity.finish(); in onReceive()
[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 …]

1234567891011