/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | WindowMetricsActivityTests.java | 65 final MetricsActivity activity = startActivityInWindowingMode(MetricsActivity.class, in testMetricsMatchesLayoutOnActivityOnCreate() local 67 final OnLayoutChangeListener listener = activity.mListener; in testMetricsMatchesLayoutOnActivityOnCreate() 71 WindowMetricsTestHelper.assertMetricsMatchesLayout(activity.mOnCreateCurrentMetrics, in testMetricsMatchesLayoutOnActivityOnCreate() 72 activity.mOnCreateMaximumMetrics, listener.getLayoutBounds(), in testMetricsMatchesLayoutOnActivityOnCreate() 78 final MetricsActivity activity = startActivityInWindowingMode(MetricsActivity.class, in testMetricsMatchesDisplayAreaOnActivity() local 81 assertMetricsValidity(activity); in testMetricsMatchesDisplayAreaOnActivity() 89 final MinAspectRatioActivity activity = startActivityInWindowingMode( in testMetricsMatchesActivityBoundsOnNonresizableActivity() local 91 mWmState.computeState(activity.getComponentName()); in testMetricsMatchesActivityBoundsOnNonresizableActivity() 93 assertMetricsValidityForNonresizableActivity(activity); in testMetricsMatchesActivityBoundsOnNonresizableActivity() 100 final MetricsActivity activity = startActivityInWindowingMode(MetricsActivity.class, in testMetricsMatchesLayoutOnPipActivity() local [all …]
|
D | CompatChangeTests.java | 219 ComponentName activity = NON_RESIZEABLE_LARGE_ASPECT_RATIO_ACTIVITY; in testSandboxForNonResizableActivityPackageUnboundedInNeverSandboxDeviceConfigFlag() local 221 "com.android.other::," + activity.getPackageName() + "::"); in testSandboxForNonResizableActivityPackageUnboundedInNeverSandboxDeviceConfigFlag() 222 runSandboxTest(activity, /* isSandboxed= */ false); in testSandboxForNonResizableActivityPackageUnboundedInNeverSandboxDeviceConfigFlag() 232 ComponentName activity = NON_RESIZEABLE_LARGE_ASPECT_RATIO_ACTIVITY; in testSandboxForNonResizableActivityPackageWithinRangeInNeverSandboxDeviceConfig() local 233 long version = getPackageVersion(activity); in testSandboxForNonResizableActivityPackageWithinRangeInNeverSandboxDeviceConfig() 235 "com.android.other::," + activity.getPackageName() + ":" + String.valueOf( in testSandboxForNonResizableActivityPackageWithinRangeInNeverSandboxDeviceConfig() 237 runSandboxTest(activity, /* isSandboxed= */ false); in testSandboxForNonResizableActivityPackageWithinRangeInNeverSandboxDeviceConfig() 247 ComponentName activity = NON_RESIZEABLE_LARGE_ASPECT_RATIO_ACTIVITY; in testSandboxForNonResizableActivityPackageOutsideRangeInNeverSandboxDeviceConfig() local 248 long version = getPackageVersion(activity); in testSandboxForNonResizableActivityPackageOutsideRangeInNeverSandboxDeviceConfig() 250 "com.android.other::," + activity.getPackageName() + ":" + String.valueOf( in testSandboxForNonResizableActivityPackageOutsideRangeInNeverSandboxDeviceConfig() [all …]
|
D | DecorInsetTests.java | 40 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 …]
|
D | LayoutTests.java | 94 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 …]
|
D | AspectRatioTestsBase.java | 47 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 …]
|
D | WindowInsetsLayoutTests.java | 63 final TestActivity activity = in testSetFitInsetsTypes() local 67 final View mainWindowRoot = activity.getWindow().getDecorView(); in testSetFitInsetsTypes() 71 activity.assertMatchesWindowBounds(); in testSetFitInsetsTypes() 74 testSetFitInsetsTypesInner(Type.statusBars(), activity, mainWindowRoot); in testSetFitInsetsTypes() local 75 testSetFitInsetsTypesInner(Type.navigationBars(), activity, mainWindowRoot); in testSetFitInsetsTypes() local 76 testSetFitInsetsTypesInner(Type.systemBars(), activity, mainWindowRoot); in testSetFitInsetsTypes() local 80 int types, TestActivity activity, View mainWindowRoot) { in testSetFitInsetsTypesInner() argument 82 activity.addChildWindow(types, Side.all(), false); in testSetFitInsetsTypesInner() 86 final View childWindowRoot = activity.getChildWindowRoot(); in testSetFitInsetsTypesInner() 100 activity.removeChildWindow(); in testSetFitInsetsTypesInner() [all …]
|
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/ |
D | LoginActivityTest.java | 115 final LoginActivity activity = launchActivity(); in testSimpleLifecycle_defaultSession() local 118 activity.finish(); in testSimpleLifecycle_defaultSession() 124 activity.assertDefaultEvents(session); in testSimpleLifecycle_defaultSession() 126 final ComponentName name = activity.getComponentName(); in testSimpleLifecycle_defaultSession() 142 LoginActivity.onRootView((activity, rootView) -> { in testContentCaptureSessionCache() argument 160 final LoginActivity activity = launchActivity(); in testContentCaptureSessionCache() local 163 activity.finish(); in testContentCaptureSessionCache() 169 assertSessionId(childSessionId, activity.getRootView()); in testContentCaptureSessionCache() 182 LoginActivity.onRootView((activity, rootView) -> { in testSimpleLifecycle_rootViewSession() argument 192 final LoginActivity activity = launchActivity(); in testSimpleLifecycle_rootViewSession() local [all …]
|
D | LoginActivity.java | 99 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 …]
|
D | CustomViewActivityTest.java | 101 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 …]
|
/cts/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/src/com/android/cts/isolatedsplitapp/ |
D | SplitAppTest.java | 100 final Activity activity = mActivityRule.launchActivity( in shouldLoadDefault() local 102 final TestTheme testTheme = new TestTheme(activity, R.style.Theme_Base); in shouldLoadDefault() 103 final Resources resources = activity.getResources(); in shouldLoadDefault() 110 assertActivityThemeApplied(activity, testTheme); in shouldLoadDefault() 113 assertActivitiesDoNotExist(activity, FEATURE_A_ACTIVITY, FEATURE_B_ACTIVITY, in shouldLoadDefault() 115 assertResourcesDoNotExist(activity, FEATURE_A_STRING, FEATURE_B_STRING, FEATURE_C_STRING, in shouldLoadDefault() 122 final Activity activity = mActivityRule.launchActivity( in shouldLoadPolishLocale() local 124 final TestTheme testTheme = new TestTheme(activity, R.style.Theme_Base); in shouldLoadPolishLocale() 125 final Resources resources = activity.getResources(); in shouldLoadPolishLocale() 132 assertActivityThemeApplied(activity, testTheme); in shouldLoadPolishLocale() [all …]
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityCallbacksTest.java | 94 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 …]
|
D | TaskDescriptionTest.java | 65 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/testsdk29/src/android/server/wm/ |
D | DecorInsetSdk29Tests.java | 40 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/testcore/ |
D | AutofillTestWatcher.java | 91 @NonNull AbstractAutoFillActivity activity) { in registerActivity() argument 93 if (sUnfinishedBusiness.contains(activity)) { in registerActivity() 94 throw new IllegalStateException("Already registered " + activity); in registerActivity() 96 Log.v(TAG, "registering activity on " + where + ": " + activity); in registerActivity() 97 sUnfinishedBusiness.add(activity); in registerActivity() 98 sAllActivities.add(activity); in registerActivity() 101 sAllActivities.add(activity); in registerActivity() 110 @NonNull AbstractAutoFillActivity activity) { in unregisterActivity() argument 112 final boolean unregistered = sUnfinishedBusiness.remove(activity); in unregisterActivity() 114 Log.d(TAG, "unregistered activity on " + where + ": " + activity); in unregisterActivity() [all …]
|
/cts/tests/app/app/src/android/app/stubs/ |
D | ActivityCallbacksTestActivity.java | 71 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 …]
|
D | OrientationTestUtils.java | 37 public static void toggleOrientation(Activity activity) { in toggleOrientation() argument 38 final int[] orientations = getOrientations(activity); in toggleOrientation() 39 activity.setRequestedOrientation(orientations[1]); in toggleOrientation() 40 activity.setRequestedOrientation(orientations[0]); in toggleOrientation() 49 public static void switchOrientation(final Activity activity) { in switchOrientation() argument 50 final int[] orientations = getOrientations(activity); in switchOrientation() 51 activity.setRequestedOrientation(orientations[1]); in switchOrientation() 60 private static int[] getOrientations(final Activity activity) { in getOrientations() argument 63 activity.getDisplay().getDisplayInfo(displayInfo); in getOrientations() 74 public static boolean isCloseToSquareDisplay(final Activity activity) { in isCloseToSquareDisplay() argument [all …]
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | ActivitiesWatcher.java | 54 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/ |
D | TestResult.java | 57 public static void setPassedResult(Activity activity, String testId, String testDetails) { in setPassedResult() argument 58 setPassedResult(activity, testId, testDetails, null /*reportLog*/); in setPassedResult() 62 public static void setPassedResult(Activity activity, String testId, String testDetails, in setPassedResult() argument 64 Log.i(TAG, "setPassedResult(activity=" + activity + ", testId=" + testId in setPassedResult() 66 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_PASSED, testId, in setPassedResult() 71 public static void setPassedResult(Activity activity, String testId, String testDetails, in setPassedResult() argument 73 Log.i(TAG, "setPassedResult(activity=" + activity + ", testId=" + testId in setPassedResult() 75 activity.setResult(Activity.RESULT_OK, createResult(activity, TEST_RESULT_PASSED, testId, in setPassedResult() 80 public static void setFailedResult(Activity activity, String testId, String testDetails) { in setFailedResult() argument 81 setFailedResult(activity, testId, testDetails, null /*reportLog*/); in setFailedResult() [all …]
|
D | PassFailButtons.java | 424 void setPassFailClickListeners(final T activity) { in setPassFailClickListeners() argument 428 setTestResultAndFinish(activity, activity.getTestId(), activity.getTestDetails(), in setPassFailClickListeners() 429 activity.getReportLog(), activity.getHistoryCollection(), target); in setPassFailClickListeners() 433 View passButton = activity.findViewById(R.id.pass_button); in setPassFailClickListeners() 438 Toast.makeText(activity, R.string.pass_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners() 443 View failButton = activity.findViewById(R.id.fail_button); in setPassFailClickListeners() 448 Toast.makeText(activity, R.string.fail_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners() 454 protected static void setInfo(final android.app.Activity activity, final int titleId, in setInfo() argument 457 View infoButton = activity.findViewById(R.id.info_button); in setInfo() 462 showInfoDialog(activity, titleId, messageId, viewId); in setInfo() [all …]
|
/cts/tests/tests/app.usage/src/android/app/usage/cts/ |
D | UsageReportingTest.java | 76 Activity activity; in testUsageStartAndStopReporting() local 78 activity = Activities.startedActivities.valueAt(0); in testUsageStartAndStopReporting() 81 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageStartAndStopReporting() 84 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsageStartAndStopReporting() 88 mUsageStatsManager.reportUsageStart(activity, TOKEN_0); in testUsageStartAndStopReporting() 91 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsageStartAndStopReporting() 99 Activity activity; in testUsagePastReporting() local 101 activity = Activities.startedActivities.valueAt(0); in testUsagePastReporting() 104 mUsageStatsManager.reportUsageStart(activity, TOKEN_0, 100); in testUsagePastReporting() 107 mUsageStatsManager.reportUsageStop(activity, TOKEN_0); in testUsagePastReporting() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/servicebehavior/ |
D | DisableAutofillTest.java | 101 final SimpleSaveActivity activity = startSimpleSaveActivity(); in launchSimpleSaveActivity() local 102 final MyAutofillCallback callback = activity.registerCallback(); in launchSimpleSaveActivity() 106 activity.syncRunOnUiThread(() -> activity.mInput.requestFocus()); in launchSimpleSaveActivity() 109 callback.assertUiUnavailableEvent(activity.mInput); in launchSimpleSaveActivity() 113 activity.syncRunOnUiThread(() -> activity.mPassword.requestFocus()); in launchSimpleSaveActivity() 117 activity.getAutofillManager().requestAutofill(activity.mInput); in launchSimpleSaveActivity() 120 callback.assertUiShownEvent(activity.mInput); in launchSimpleSaveActivity() 123 activity.expectAutoFill("id", "pass"); in launchSimpleSaveActivity() 129 assertAutofillEnabled(activity, action == PostLaunchAction.ASSERT_ENABLED_AND_AUTOFILL); in launchSimpleSaveActivity() 131 mUiBot.waitForWindowChange(() -> activity.finish()); in launchSimpleSaveActivity() [all …]
|
/cts/tests/tests/systemui/src/android/systemui/cts/ |
D | LightBarTests.java | 110 final LightBarActivity activity = mActivityRule.getActivity(); in testAppearanceCanOverwriteLegacyFlags() local 111 activity.runOnUiThread(() -> { in testAppearanceCanOverwriteLegacyFlags() 112 activity.getWindow().setStatusBarColor(LIGHT_BG_COLOR); in testAppearanceCanOverwriteLegacyFlags() 113 activity.getWindow().setNavigationBarColor(LIGHT_BG_COLOR); in testAppearanceCanOverwriteLegacyFlags() 115 activity.setLightStatusBarLegacy(true); in testAppearanceCanOverwriteLegacyFlags() 116 activity.setLightNavigationBarLegacy(true); in testAppearanceCanOverwriteLegacyFlags() 120 activity.setLightStatusBarAppearance(false); in testAppearanceCanOverwriteLegacyFlags() 121 activity.setLightNavigationBarAppearance(false); in testAppearanceCanOverwriteLegacyFlags() 137 final LightBarActivity activity = mActivityRule.getActivity(); in testLegacyFlagsCannotOverwriteAppearance() local 138 activity.runOnUiThread(() -> { in testLegacyFlagsCannotOverwriteAppearance() [all …]
|
/cts/tests/tests/view/src/android/view/cts/ |
D | View_FocusHandlingTest.java | 56 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 …]
|
D | View_InitialFocusTest.java | 52 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 …]
|
/cts/tests/framework/base/windowmanager/app/src/android/server/wm/app/ |
D | BroadcastReceiverActivity.java | 105 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 …]
|