Home
last modified time | relevance | path

Searched refs:getActivity (Results 1 – 25 of 240) sorted by relevance

12345678910

/cts/tests/tests/widget/src/android/widget/cts/
DLayoutDirectionTest.java42 checkDefaultDirectionForOneLayoutWithCode(new LinearLayout(getActivity())); in testLayoutDirectionDefaults()
43 checkDefaultDirectionForOneLayoutWithCode(new FrameLayout(getActivity())); in testLayoutDirectionDefaults()
44 checkDefaultDirectionForOneLayoutWithCode(new TableLayout(getActivity())); in testLayoutDirectionDefaults()
45 checkDefaultDirectionForOneLayoutWithCode(new RelativeLayout(getActivity())); in testLayoutDirectionDefaults()
46 checkDefaultDirectionForOneLayoutWithCode(new GridLayout(getActivity())); in testLayoutDirectionDefaults()
67 checkDirectionForOneLayoutWithCode(new LinearLayout(getActivity())); in testDirectionForAllLayoutsWithCode()
68 checkDirectionForOneLayoutWithCode(new FrameLayout(getActivity())); in testDirectionForAllLayoutsWithCode()
69 checkDirectionForOneLayoutWithCode(new TableLayout(getActivity())); in testDirectionForAllLayoutsWithCode()
70 checkDirectionForOneLayoutWithCode(new RelativeLayout(getActivity())); in testDirectionForAllLayoutsWithCode()
71 checkDirectionForOneLayoutWithCode(new GridLayout(getActivity())); in testDirectionForAllLayoutsWithCode()
[all …]
DSpinnerTest.java68 Spinner spinner = (Spinner) getActivity().findViewById(R.id.spinner1); in testConstructor()
78 spinner = (Spinner) getActivity().findViewById(R.id.spinner1); in testGetBaseline()
99 final Spinner spinner = (Spinner) getActivity().findViewById(R.id.spinner1); in testPerformClick()
111 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in testOnClick()
125 Dialog dialog = new Dialog(getActivity()); in testOnClick()
DAnalogClockTest.java43 XmlPullParser parser = getActivity().getResources().getXml(R.layout.analogclock); in setUp()
45 mActivity = getActivity(); in setUp()
/cts/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityEndToEndTest.java64 expected.setPackageName(getActivity().getPackageName()); in testTypeViewSelectedAccessibilityEvent()
65 expected.getText().add(getActivity().getString(R.string.second_list_item)); in testTypeViewSelectedAccessibilityEvent()
73 final ListView listView = (ListView) getActivity().findViewById(R.id.listview); in testTypeViewSelectedAccessibilityEvent()
81 getActivity().runOnUiThread(new Runnable() { in testTypeViewSelectedAccessibilityEvent()
105 expected.setPackageName(getActivity().getPackageName()); in testTypeViewClickedAccessibilityEvent()
106 expected.getText().add(getActivity().getString(R.string.button_title)); in testTypeViewClickedAccessibilityEvent()
109 final Button button = (Button) getActivity().findViewById(R.id.button); in testTypeViewClickedAccessibilityEvent()
117 getActivity().runOnUiThread(new Runnable() { in testTypeViewClickedAccessibilityEvent()
141 expected.setPackageName(getActivity().getPackageName()); in testTypeViewLongClickedAccessibilityEvent()
142 expected.getText().add(getActivity().getString(R.string.button_title)); in testTypeViewLongClickedAccessibilityEvent()
[all …]
DAccessibilityTextTraversalTest.java45 final View view = getActivity().findViewById(R.id.view); in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
84 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
114 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
144 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
178 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
208 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
238 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityCharacterOverContentDescription()
260 final View view = getActivity().findViewById(R.id.view); in testActionNextAndPreviousAtGranularityWordOverContentDescription()
299 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityWordOverContentDescription()
329 && event.getPackageName().equals(getActivity().getPackageName()) in testActionNextAndPreviousAtGranularityWordOverContentDescription()
[all …]
/cts/tests/tests/view/src/android/view/animation/cts/
DAnimatorInflaterTest.java63 .loadAnimator(getActivity(), R.anim.changing_test_animator); in testLoadAnimatorWithDifferentInterpolators()
68 .loadAnimator(getActivity(), R.anim.changing_test_animator); in testLoadAnimatorWithDifferentInterpolators()
79 Animator anim1 = AnimatorInflater.loadAnimator(getActivity(), R.anim.test_animator); in testLoadAnimator()
80 Animator anim2 = AnimatorInflater.loadAnimator(getActivity(), R.anim.test_animator); in testLoadAnimator()
85 float targetX = getActivity().getResources() in testLoadAnimator()
88 float targetY = getActivity().getResources() in testLoadAnimator()
121 anim1 = AnimatorInflater.loadAnimator(getActivity(), R.anim.test_animator); in testLoadAnimator()
122 anim2 = AnimatorInflater.loadAnimator(getActivity(), R.anim.test_animator); in testLoadAnimator()
128 WindowManager mWindowManager = (WindowManager) getActivity() in rotate()
133 getActivity().getClass().getName(), null, false); in rotate()
[all …]
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvInputManagerTest.java67 if (!Utils.hasTvInputFramework(getActivity())) { in setUp()
70 mManager = (TvInputManager) getActivity().getSystemService(Context.TV_INPUT_SERVICE); in setUp()
76 if (!Utils.hasTvInputFramework(getActivity())) { in testGetInputState()
83 if (!Utils.hasTvInputFramework(getActivity())) { in testGetTvInputInfo()
91 if (!Utils.hasTvInputFramework(getActivity())) { in testGetTvInputList()
106 if (!Utils.hasTvInputFramework(getActivity())) { in testIsParentalControlsEnabled()
117 if (!Utils.hasTvInputFramework(getActivity())) { in testIsRatingBlocked()
128 if (!Utils.hasTvInputFramework(getActivity())) { in testRegisterUnregisterCallback()
131 getActivity().runOnUiThread(new Runnable() { in testRegisterUnregisterCallback()
146 if (!Utils.hasTvInputFramework(getActivity())) { in testInputAddedAndRemoved()
[all …]
DBundledTvInputServiceTest.java96 mActivity = getActivity(); in setUp()
113 if (!Utils.hasTvInputFramework(getActivity())) { in tearDown()
132 if (!Utils.hasTvInputFramework(getActivity())) { in testTune()
157 if (!Utils.hasTvInputFramework(getActivity())) { in testTuneStress()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DPrimaryUserTest.java51 mPackageManager = getActivity().getPackageManager(); in setUp()
57 getActivity().startActivity(PrimaryUserActivity.ACTION); in testAddCrossProfileIntentFilter_primary()
58 assertTrue(getActivity().checkActivityStarted()); in testAddCrossProfileIntentFilter_primary()
72 getActivity().startActivity(ManagedProfileActivity.ACTION); in testAddCrossProfileIntentFilter_managed()
73 assertTrue(getActivity().checkActivityStarted()); in testAddCrossProfileIntentFilter_managed()
DManagedProfileTest.java51 mPackageManager = getActivity().getPackageManager(); in setUp()
53 getActivity().getSystemService(Context.DEVICE_POLICY_SERVICE); in setUp()
74 getActivity().startActivity(ManagedProfileActivity.ACTION); in testClearCrossProfileIntentFilters()
75 assertTrue(getActivity().checkActivityStarted()); in testClearCrossProfileIntentFilters()
89 getActivity().startActivity(PrimaryUserActivity.ACTION); in testAddCrossProfileIntentFilter_primary()
90 assertTrue(getActivity().checkActivityStarted()); in testAddCrossProfileIntentFilter_primary()
120 getActivity().startActivity(ManagedProfileActivity.ACTION); in testAddCrossProfileIntentFilter_managed()
121 assertTrue(getActivity().checkActivityStarted()); in testAddCrossProfileIntentFilter_managed()
/cts/tests/tests/textureview/src/android/textureview/cts/
DTextureViewTest.java31 if (!getActivity().waitForCompletion()) in testTextureViewStress48Hz()
38 if (!getActivity().waitForCompletion()) in testTextureViewStress60Hz()
45 if (!getActivity().waitForCompletion()) in testTextureViewStress70Hz()
52 if (!getActivity().waitForCompletion()) in testTextureViewStress200Hz()
/cts/tests/tests/graphics/src/android/graphics/cts/
DMovieTest.java44 mMovie = getActivity().getResources().getMovie(MOVIE); in setUp()
80 source = getActivity().getResources().openRawResource(MOVIE); in writeSampleImage()
113 InputStream is = getActivity().getResources().openRawResource(MOVIE); in testDecodeByteArray()
124 InputStream is = getActivity().getResources() in testDecodeStream()
145 int expectedHeight = getActivity().getResources().getDrawable(MOVIE).getIntrinsicHeight(); in testGetMovieProperties()
146 int scaledHeight = WidgetTestUtils.convertDipToPixels(getActivity(), mMovie.height()); in testGetMovieProperties()
149 int expectedWidth = getActivity().getResources().getDrawable(MOVIE).getIntrinsicWidth(); in testGetMovieProperties()
150 int scaledWidth = WidgetTestUtils.convertDipToPixels(getActivity(), mMovie.width()); in testGetMovieProperties()
/cts/tests/tests/opengl/src/android/opengl/cts/
DNativeColorBufferTest.java36 mActivity = getActivity(); in setUp()
45 mActivity = getActivity(); in test_RGBA_1001()
64 mActivity = getActivity(); in test_RGBA_1101()
83 mActivity = getActivity(); in test_RGBA_1111()
102 mActivity = getActivity(); in test_RGBA_0101()
121 mActivity = getActivity(); in test_RGBA_0011()
140 mActivity = getActivity(); in test_RGBA_0000()
159 mActivity = getActivity(); in test_RGBA_rand_val_one()
DColorBufferTest.java35 mActivity = getActivity(); in setUp()
50 mActivity = getActivity(); in test_RGBA_1001()
69 mActivity = getActivity(); in test_RGBA_1101()
88 mActivity = getActivity(); in test_RGBA_1111()
107 mActivity = getActivity(); in test_RGBA_0101()
126 mActivity = getActivity(); in test_RGBA_0011()
145 mActivity = getActivity(); in test_RGBA_0000()
164 mActivity = getActivity(); in test_RGBA_rand_val_one()
/cts/tests/uiautomator/test-apps/CtsUiAutomatorApp/src/com/android/cts/uiautomator/
DTest2DetailFragment.java50 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onOptionsItemSelected()
71 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateView()
83 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateView()
96 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateView()
108 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateView()
121 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateView()
133 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreateView()
DTest4DetailFragment.java60 getActivity().getActionBar().removeAllTabs(); in onDestroyView()
70 final ActionBar actionBar = getActivity().getActionBar(); in onCreateView()
78 mSectionsPagerAdapter = new SectionsPagerAdapter(getActivity().getSupportFragmentManager()); in onCreateView()
171 TextView textView = new TextView(getActivity()); in onCreateView()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DByodPresentMediaDialog.java84 final Dialog dialog = new Dialog(getActivity()); in onCreateDialog()
91 ((DialogCallback) getActivity()).onDialogClose(); in onCreateDialog()
133 mediaPlayer.setDataSource(getActivity(), uri); in onCreateDialog()
138 Toast.makeText(getActivity(), R.string.provisioning_byod_capture_media_error, in onCreateDialog()
140 getActivity().finish(); in onCreateDialog()
161 ((DialogCallback) getActivity()).onDialogClose(); in onCancel()
/cts/tests/tests/app/src/android/app/cts/
DPendingIntentTest.java104 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, in testGetActivity()
116 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, in testGetActivity()
120 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, in testGetActivity()
381 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, in testGetTargetPackage()
388 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, in testEquals()
391 PendingIntent target = PendingIntent.getActivity(mContext, 1, mIntent, in testEquals()
396 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, 1); in testEquals()
398 target = PendingIntent.getActivity(mContext, 1, mIntent, 1); in testEquals()
406 mPendingIntent = PendingIntent.getActivity(mContext, 1, mIntent, 1); in testEquals()
407 target = PendingIntent.getActivity(mContext, 1, mIntent, 1); in testEquals()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DFocusFinderTest.java44 mLayout = getActivity().layout; in setUp()
45 mTopLeft = getActivity().topLeftButton; in setUp()
46 mTopRight = getActivity().topRightButton; in setUp()
47 mBottomLeft = getActivity().bottomLeftButton; in setUp()
48 mBottomRight = getActivity().bottomRightButton; in setUp()
/cts/tests/leanbackjank/app/src/android/cts/jank/leanback/ui/
DMainFragment.java66 Intent intent = getActivity().getIntent(); in onActivityCreated()
93 mBackgroundManager = BackgroundManager.getInstance(getActivity()); in prepareBackgroundManager()
94 mBackgroundManager.attach(getActivity().getWindow()); in prepareBackgroundManager()
95 mBackgroundManager.setDrawable(getActivity().getResources().getDrawable( in prepareBackgroundManager()
98 getActivity().getWindowManager().getDefaultDisplay().getMetrics(mMetrics); in prepareBackgroundManager()
102 setBadgeDrawable(getActivity().getResources().getDrawable( in setupUIElements()
/cts/tests/tests/text/src/android/text/method/cts/
DScrollingMovementMethodTest.java64 mTextView = new TextView(getActivity()); in setUp()
67 mScaledTouchSlop = ViewConfiguration.get(getActivity()).getScaledTouchSlop(); in setUp()
97 int width = WidgetTestUtils.convertDipToPixels(getActivity(), LITTLE_SPACE); in testOnTouchEventHorizontalMotion()
98 getActivity().setContentView(mTextView, in testOnTouchEventHorizontalMotion()
201 getActivity().setContentView(mTextView,
302 int width = WidgetTestUtils.convertDipToPixels(getActivity(), LITTLE_SPACE);
303 getActivity().setContentView(mTextView,
380 getActivity().setContentView(mTextView);
417 int width = WidgetTestUtils.convertDipToPixels(getActivity(), LITTLE_SPACE);
418 getActivity().setContentView(mTextView,
[all …]
/cts/tests/tests/permission/src/android/permission/cts/
DNoActivityRelatedPermissionTest.java47 mActivity = getActivity(); in setUp()
57 ActivityManager manager = (ActivityManager) getActivity() in testGetTask()
/cts/tests/tests/admin/src/android/admin/cts/
DDeviceAdminActivationTest.java75 getActivity().setOnActivityResultListener(mMockOnActivityResultListener); in setUp()
160 getActivity().startActivityForResult( in startAddDeviceAdminActivityForResult()
194 getActivity().finishActivity(REQUEST_CODE_ACTIVATE_ADMIN); in finishActivateDeviceAdminActivity()
199 (DevicePolicyManager) getActivity().getSystemService( in assertDeviceAdminDeactivated()
/cts/tests/tests/tv/src/android/tv/settings/cts/
DSettingsLeanbackTest.java44 mActivity = getActivity(); in setUp()
85 PackageManager packageManager = getActivity().getPackageManager(); in assertIntentCanBeHandled()
/cts/tests/tests/dpi/src/android/dpi/cts/
DAspectRatioTest.java49 double aspectRatio = getRealAspectRatio(getActivity()); in testAspectRatio()
53 if (getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { in testAspectRatio()

12345678910