Home
last modified time | relevance | path

Searched refs:mActivity (Results 1 – 25 of 167) sorted by relevance

1234567

/cts/tests/tests/os/src/android/os/cts/
DCountDownTimerTest.java28 private CountDownTimerTestStub mActivity; field in CountDownTimerTest
38 mActivity = (CountDownTimerTestStub) getInstrumentation().startActivitySync(intent); in setUp()
40 mActivity.countDownTimer.start(); in setUp()
44 int count = (int) (mActivity.MILLISINFUTURE / mActivity.INTERVAL); in testCountDownTimer()
45 final long TIMEOUT_MSEC = mActivity.MILLISINFUTURE + mActivity.INTERVAL + OFFSET * count; in testCountDownTimer()
47 assertTrue(mActivity.onFinished); in testCountDownTimer()
48 assertEqualsTickTime(mActivity.tickTimes, OFFSET); in testCountDownTimer()
52 final long DELAY_MSEC = mActivity.INTERVAL + OFFSET; in testCountDownTimerCancel()
53 assertTrue(DELAY_MSEC < mActivity.MILLISINFUTURE); in testCountDownTimerCancel()
55 assertFalse(mActivity.onFinished); in testCountDownTimerCancel()
[all …]
/cts/tests/tests/app/src/android/app/cts/
DAlertDialogTest.java42 private DialogStubActivity mActivity; field in AlertDialogTest
58 mActivity = DialogStubActivity.startDialogActivity(this, dialogNumber); in startDialogActivity()
62 return mActivity.getDialog().isShowing(); in startDialogActivity()
73 assertTrue(mActivity.getDialog().isShowing()); in doTestAlertDialog()
75 mPositiveButton = ((AlertDialog) (mActivity.getDialog())).getButton( in doTestAlertDialog()
78 assertEquals(mActivity.getString(com.android.cts.app.stub.R.string.alert_dialog_positive), in doTestAlertDialog()
80 mNeutralButton = ((AlertDialog) (mActivity.getDialog())).getButton( in doTestAlertDialog()
83 assertEquals(mActivity.getString(com.android.cts.app.stub.R.string.alert_dialog_neutral), in doTestAlertDialog()
85 mNegativeButton = ((AlertDialog) (mActivity.getDialog())).getButton( in doTestAlertDialog()
88 assertEquals(mActivity.getString(com.android.cts.app.stub.R.string.alert_dialog_negative), in doTestAlertDialog()
[all …]
DInstrumentationTest.java57 private InstrumentationTestActivity mActivity; field in InstrumentationTest
70 mActivity = (InstrumentationTestActivity) mInstrumentation.startActivitySync(mIntent); in setUp()
76 if (mActivity != null) { in tearDown()
77 mActivity.finish(); in tearDown()
78 mActivity = null; in tearDown()
88 if (mActivity != null) in testMonitor()
89 mActivity.finish(); in testMonitor()
128 mActivity.setOnCreateCalled(false); in testCallActivityOnCreate()
131 mInstrumentation.callActivityOnCreate(mActivity, new Bundle()); in testCallActivityOnCreate()
135 assertTrue(mActivity.isOnCreateCalled()); in testCallActivityOnCreate()
[all …]
DTabActivityTest.java33 private MockTabActivity mActivity; field in TabActivityTest
44 if (mActivity != null) { in tearDown()
45 if (!mActivity.isFinishing()) { in tearDown()
46 mActivity.finish(); in tearDown()
68 mActivity = (MockTabActivity) mInstrumentation.startActivitySync(intent); in testTabActivity()
71 assertTrue(mActivity.isOnContentChangedCalled); in testTabActivity()
72 assertTrue(mActivity.isOnPostCreateCalled); in testTabActivity()
76 mActivity.setDefaultTab(defaultIndex); in testTabActivity()
78 mActivity.setDefaultTab(defaultTab); in testTabActivity()
80 final TabHost tabHost = mActivity.getTabHost(); in testTabActivity()
/cts/tests/tests/opengl/src/android/opengl/cts/
DColorBufferTest.java26 private OpenGLES20ActivityTwo mActivity; field in ColorBufferTest
35 mActivity = getActivity(); in setUp()
50 mActivity = getActivity(); in test_RGBA_1001()
54 mActivity.setView(Constants.COLOR, 1, vertexColors); in test_RGBA_1001()
57 assertTrue(mActivity.waitForFrameDrawn()); in test_RGBA_1001()
58 float[] actualColor = mActivity.getActualColor(); in test_RGBA_1001()
69 mActivity = getActivity(); in test_RGBA_1101()
72 mActivity.setView(Constants.COLOR, 1, vertexColors); in test_RGBA_1101()
75 assertTrue(mActivity.waitForFrameDrawn()); in test_RGBA_1101()
76 float[] actualColor = mActivity.getActualColor(); in test_RGBA_1101()
[all …]
DNativeColorBufferTest.java27 private OpenGLES20NativeActivityTwo mActivity; field in NativeColorBufferTest
36 mActivity = getActivity(); in setUp()
45 mActivity = getActivity(); in test_RGBA_1001()
49 mActivity.setView(Constants.COLOR, 1, vertexColors); in test_RGBA_1001()
52 assertTrue(mActivity.waitForFrameDrawn()); in test_RGBA_1001()
53 float[] actualColor = mActivity.getActualColor(); in test_RGBA_1001()
64 mActivity = getActivity(); in test_RGBA_1101()
67 mActivity.setView(Constants.COLOR, 1, vertexColors); in test_RGBA_1101()
70 assertTrue(mActivity.waitForFrameDrawn()); in test_RGBA_1101()
71 float[] actualColor = mActivity.getActualColor(); in test_RGBA_1101()
[all …]
DNativeAttachShaderTest.java25 private OpenGLES20NativeActivityOne mActivity; field in NativeAttachShaderTest
49 mActivity = getShaderActivity(Constants.SHADER, 1); in test_glAttachedShaders_validshader()
50 int shaderCount = mActivity.mRenderer.mShaderCount; in test_glAttachedShaders_validshader()
52 int error = mActivity.mRenderer.mAttachShaderError; in test_glAttachedShaders_validshader()
65 mActivity = getShaderActivity(Constants.SHADER, 2); in test_glAttachedShaders_invalidshader()
66 int error = mActivity.mRenderer.mAttachShaderError; in test_glAttachedShaders_invalidshader()
79 mActivity = getShaderActivity(Constants.SHADER, 3); in test_glAttachedShaders_attach_same_shader()
80 int error = mActivity.mRenderer.mAttachShaderError; in test_glAttachedShaders_attach_same_shader()
93 mActivity = getShaderActivity(Constants.SHADER, 4); in test_glAttachedShaders_noshader()
97 int error = mActivity.mRenderer.mAttachShaderError; in test_glAttachedShaders_noshader()
[all …]
DAttachShaderTest.java24 private OpenGLES20ActivityOne mActivity; field in AttachShaderTest
48 mActivity = getShaderActivity(Constants.SHADER, 1); in test_glAttachedShaders_validshader()
49 int shaderCount = mActivity.getNoOfAttachedShaders(); in test_glAttachedShaders_validshader()
51 int error = mActivity.glGetError(); in test_glAttachedShaders_validshader()
96 mActivity = getShaderActivity(Constants.SHADER, 4); in test_glAttachedShaders_noshader()
97 int shaderCount = mActivity.getNoOfAttachedShaders(); in test_glAttachedShaders_noshader()
99 int error = mActivity.glGetError(); in test_glAttachedShaders_noshader()
112 mActivity = getShaderActivity(Constants.SHADER, 6); in test_glAttachShaders_emptyfragshader_emptyvertexshader()
113 int error = mActivity.glGetError(); in test_glAttachShaders_emptyfragshader_emptyvertexshader()
127 mActivity = getShaderActivity(Constants.SHADER, 8); in test_glAttachShaders_programobject_attach_fragshaderobject()
[all …]
/cts/tests/tests/preference/src/android/preference/cts/
DPreferenceActivityTest.java30 private PreferenceActivity mActivity; field in PreferenceActivityTest
39 mActivity = getActivity(); in setUp()
43 assertNull(mActivity.findPreference("check_box_preference_from_intent")); in testAddPreferencesFromIntent()
45 Intent intent = new Intent(mActivity, PreferenceCtsActivity.class); in testAddPreferencesFromIntent()
46 mActivity.addPreferencesFromIntent(intent); in testAddPreferencesFromIntent()
48 assertNotNull(mActivity.findPreference("check_box_preference_from_intent")); in testAddPreferencesFromIntent()
52 assertNull(mActivity.findPreference("check_box_preference_from_resource")); in testAddPreferencesFromResource()
54 mActivity.addPreferencesFromResource(R.xml.preferences_from_resource); in testAddPreferencesFromResource()
56 assertNotNull(mActivity.findPreference("check_box_preference_from_resource")); in testAddPreferencesFromResource()
60 assertNotNull(mActivity.getPreferenceManager()); in testGetPreferenceManager()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DGestureDetectorTest.java38 private GestureDetectorCtsActivity mActivity; field in GestureDetectorTest
54 mActivity = getActivity(); in setUp()
55 mGestureDetector = mActivity.getGestureDetector(); in setUp()
56 mListener = mActivity.getListener(); in setUp()
58 mActivity.isDown = false; in setUp()
59 mActivity.isScroll = false; in setUp()
60 mActivity.isFling = false; in setUp()
61 mActivity.isSingleTapUp = false; in setUp()
62 mActivity.onShowPress = false; in setUp()
63 mActivity.onLongPress = false; in setUp()
[all …]
DViewTest.java101 private ViewTestCtsActivity mActivity; field in ViewTest
111 mActivity = getActivity(); in setUp()
115 return mActivity.hasWindowFocus(); in setUp()
118 mResources = mActivity.getResources(); in setUp()
119 mMockParent = new MockViewParent(mActivity); in setUp()
120 assertTrue(mActivity.waitForWindowFocus(5 * DateUtils.SECOND_IN_MILLIS)); in setUp()
124 new View(mActivity); in testConstructor()
128 new View(mActivity, attrs); in testConstructor()
130 new View(mActivity, null); in testConstructor()
138 new View(mActivity, attrs, 0); in testConstructor()
[all …]
/cts/tests/tests/animation/src/android/animation/cts/
DObjectAnimatorTest.java29 private AnimationActivity mActivity; field in ObjectAnimatorTest
41 mActivity = getActivity(); in setUp()
42 mObjectAnimator = (ObjectAnimator) mActivity.createAnimatorWithDuration(mDuration); in setUp()
47 ObjectAnimator objectAnimatorLocal = (ObjectAnimator)mActivity.createAnimatorWithDuration( in testDuration()
53 Object object = mActivity.view.newBall; in testOfFloat()
55 float startY = mActivity.mStartY; in testOfFloat()
56 float endY = mActivity.mStartY + mActivity.mDeltaY; in testOfFloat()
66 float x = mActivity.view.newBall.getX(); in testOfFloat()
67 float y = mActivity.view.newBall.getY(); in testOfFloat()
73 Object object = mActivity.view.newBall; in testOfFloatBase()
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DMediaControllerTest.java48 private Activity mActivity; field in MediaControllerTest
59 mActivity = getActivity(); in setUp()
65 new MediaController(mActivity, null); in testConstructor()
67 new MediaController(mActivity, true); in testConstructor()
69 new MediaController(mActivity); in testConstructor()
72 mActivity.getResources().getXml(R.layout.mediacontroller_layout); in testConstructor()
74 new MediaController(mActivity, attrs); in testConstructor()
84 mMediaController = new MediaController(mActivity); in testMediaController()
94 View videoview = mActivity.findViewById(R.id.mediacontroller_videoview); in testMediaController()
103 mMediaController = new MediaController(mActivity, false); in testMediaController()
[all …]
DRelativeLayoutTest.java46 private Activity mActivity; field in RelativeLayoutTest
55 mActivity = getActivity(); in setUp()
59 new RelativeLayout(mActivity); in testConstructor()
61 new RelativeLayout(mActivity, null); in testConstructor()
63 new RelativeLayout(mActivity, null, 0); in testConstructor()
65 XmlPullParser parser = mActivity.getResources().getXml(R.layout.relative_layout); in testConstructor()
67 new RelativeLayout(mActivity, attrs); in testConstructor()
78 final RelativeLayout relativeLayout = (RelativeLayout) mActivity.findViewById( in testSetIgnoreGravity()
81 View view12 = mActivity.findViewById(R.id.relative_view12); in testSetIgnoreGravity()
82 View view13 = mActivity.findViewById(R.id.relative_view13); in testSetIgnoreGravity()
[all …]
DTwoLineListItemTest.java36 private Activity mActivity; field in TwoLineListItemTest
45 mActivity = getActivity(); in setUp()
49 AttributeSet attrs = mActivity.getResources().getLayout(R.layout.twolinelistitem); in testConstructor()
52 new TwoLineListItem(mActivity); in testConstructor()
59 new TwoLineListItem(mActivity, attrs); in testConstructor()
65 new TwoLineListItem(mActivity, null); in testConstructor()
67 new TwoLineListItem(mActivity, attrs, 0); in testConstructor()
73 new TwoLineListItem(mActivity, null, 0); in testConstructor()
74 new TwoLineListItem(mActivity, attrs, Integer.MAX_VALUE); in testConstructor()
75 new TwoLineListItem(mActivity, attrs, Integer.MIN_VALUE); in testConstructor()
[all …]
DViewFlipperTest.java37 private Activity mActivity; field in ViewFlipperTest
45 mActivity = getActivity(); in setUp()
46 assertNotNull(mActivity); in setUp()
51 new ViewFlipper(mActivity); in testConstructor()
53 new ViewFlipper(mActivity, null); in testConstructor()
55 XmlPullParser parser = mActivity.getResources().getXml(R.layout.viewflipper_layout); in testConstructor()
57 new ViewFlipper(mActivity, attrs); in testConstructor()
68 ViewFlipper viewFlipper = new ViewFlipper(mActivity); in testSetFlipInterval()
81 (ViewFlipper) mActivity.findViewById(R.id.viewflipper_test); in testViewFlipper()
83 TextView iv1 = (TextView) mActivity.findViewById(R.id.viewflipper_textview1); in testViewFlipper()
[all …]
DRemoteViewsTest.java72 private Activity mActivity; field in RemoteViewsTest
81 mActivity = getActivity(); in setUp()
86 mResult = mRemoteViews.apply(mActivity, null); in setUp()
122 mRemoteViews.reapply(mActivity, mResult); in testSetViewVisibility()
126 mRemoteViews.reapply(mActivity, mResult); in testSetViewVisibility()
130 mRemoteViews.reapply(mActivity, mResult); in testSetViewVisibility()
140 mRemoteViews.reapply(mActivity, mResult); in testSetTextViewText()
144 mRemoteViews.reapply(mActivity, mResult); in testSetTextViewText()
149 mRemoteViews.reapply(mActivity, mResult); in testSetTextViewText()
160 Icon iconBlack = Icon.createWithResource(mActivity, R.drawable.icon_black); in testSetIcon()
[all …]
DViewAnimatorTest.java41 private Activity mActivity; field in ViewAnimatorTest
53 mActivity = getActivity(); in setUp()
56 XmlPullParser parser = mActivity.getResources().getXml(R.layout.viewanimator_layout); in setUp()
58 mViewAnimator = new ViewAnimator(mActivity, mAttributeSet); in setUp()
60 assertNotNull(mActivity); in setUp()
66 new ViewAnimator(mActivity); in testConstructor()
67 new ViewAnimator(mActivity, mAttributeSet); in testConstructor()
71 AnimationSet expected = new AnimationSet(mActivity, mAttributeSet); in testAccessInAnimation()
81 mViewAnimator.setInAnimation(mActivity, R.anim.anim_alpha); in testAccessInAnimation()
89 final View v1 = mActivity.findViewById(R.id.ok); in testShowNext()
[all …]
DTabWidgetTest.java36 private Activity mActivity; field in TabWidgetTest
45 mActivity = getActivity(); in setUp()
49 new TabWidget(mActivity); in testConstructor()
51 new TabWidget(mActivity, null); in testConstructor()
53 new TabWidget(mActivity, null, 0); in testConstructor()
57 MockTabWidget mockTabWidget = new MockTabWidget(mActivity); in testChildDrawableStateChanged()
58 TextView tv0 = new TextView(mActivity); in testChildDrawableStateChanged()
59 TextView tv1 = new TextView(mActivity); in testChildDrawableStateChanged()
84 tabWidget.addView(new TextView(mActivity)); in testSetCurrentTab()
102 tabWidget.addView(new TextView(mActivity)); in testFocusCurrentTab()
[all …]
DListPopupWindowTest.java38 private Activity mActivity; field in ListPopupWindowTest
59 mActivity = getActivity(); in setUp()
63 new ListPopupWindow(mActivity); in testConstructor()
65 new ListPopupWindow(mActivity, null); in testConstructor()
67 new ListPopupWindow(mActivity, null, android.R.attr.popupWindowStyle); in testConstructor()
69 new ListPopupWindow(mActivity, null, 0, android.R.style.Widget_Material_ListPopupWindow); in testConstructor()
73 mPopupWindow = new ListPopupWindow(mActivity); in testAccessBackground()
84 mPopupWindow = new ListPopupWindow(mActivity); in testAccessAnimationStyle()
96 mPopupWindow = new ListPopupWindow(mActivity); in testAccessHeight()
125 WindowManager wm = (WindowManager) mActivity.getSystemService(Context.WINDOW_SERVICE); in getDisplay()
[all …]
DImageViewTest.java60 private Activity mActivity; field in ImageViewTest
73 return (ImageView) mActivity.findViewById(id); in findImageViewById()
81 source = mActivity.getResources().openRawResource(resid); in createSampleImage()
108 mActivity = getActivity(); in setUp()
112 new ImageView(mActivity); in testConstructor()
114 new ImageView(mActivity, null); in testConstructor()
116 new ImageView(mActivity, null, 0); in testConstructor()
118 XmlPullParser parser = mActivity.getResources().getXml(R.layout.imageview_layout); in testConstructor()
120 new ImageView(mActivity, attrs); in testConstructor()
121 new ImageView(mActivity, attrs, 0); in testConstructor()
[all …]
/cts/tests/tests/uidisolation/src/android/uidisolation/cts/
DIsolatedServiceTest.java29 private ServiceRunnerActivity mActivity; field in IsolatedServiceTest
44 mActivity = getActivity(); in setUp()
47 FileOutputStream fos = mActivity.openFileOutput(PermissionTestService.FILE_NAME, 0); in setUp()
56 File f = mActivity.getFileStreamPath(PermissionTestService.FILE_NAME); in tearDown()
58 mActivity.finish(); in tearDown()
68 mActivity.startIsolatedService(); in runServiceTest()
70 mActivity.startNonIsolatedService(); in runServiceTest()
74 synchronized (mActivity) { in runServiceTest()
75 if (mActivity.getSuccess() == null) { in runServiceTest()
77 mActivity.wait(SERVICE_TIMEOUT); in runServiceTest()
[all …]
/cts/tests/sample/src/android/sample/cts/
DSampleDeviceTest.java36 private SampleDeviceActivity mActivity; field in SampleDeviceTest
46 mActivity = getActivity(); in setUp()
55 mActivity = null; in tearDown()
69 mActivity.savePreference(KEY, VALUE); in testSharedPreferences()
70 assertEquals("Preferences were not saved", VALUE, mActivity.getPreference(KEY)); in testSharedPreferences()
73 mActivity.clearPreferences(); in testSharedPreferences()
74 assertNull("Preferences were not cleared", mActivity.getPreference(KEY)); in testSharedPreferences()
/cts/tests/tests/preference2/src/android/preference2/cts/
DPreferenceTest.java30 private PreferenceFromCodeActivity mActivity; field in PreferenceTest
40 mActivity = getActivity(); in setUp()
41 mPreference = (CheckBoxPreference) mActivity.findPreference( in setUp()
51 String summaryExp = mActivity.getResources().getString( in testGetSummary()
89 String titleExp = mActivity.getResources().getString( in testGetTitle()
100 String titleExp = mActivity.getResources().getString( in testSetTitle()
162 Drawable iconExp = mActivity.getResources().getDrawable(R.drawable.ic_launcher); in testGetIcon()
183 CustomPreference mCustomPreference = new CustomPreference(mActivity); in testPersistInt()
186 PreferenceGroup mPreferenceGroup = (PreferenceGroup) mActivity.findPreference( in testPersistInt()
200 CustomPreference mCustomPreference = new CustomPreference(mActivity); in testPersistBoolean()
[all …]
DDialogPreferenceTest.java28 private PreferenceFromCodeActivity mActivity; field in DialogPreferenceTest
38 mActivity = getActivity(); in setUp()
39 mDialogPreference = (DialogPreference)mActivity.findPreference( in setUp()
45 String titleExp = mActivity.getResources().getString(R.string.title_dialog_preference); in testGetTitle()
51 String titleExp = mActivity.getResources().getString( in testGetDialogTitle()
58 Drawable drawableExp = mActivity.getResources().getDrawable(R.drawable.ic_launcher); in testGetDialogIcon()
64 CharSequence dialogMessageExp = mActivity.getResources().getString( in testGetDialogMessage()
71 CharSequence postiveButtonTextExp = mActivity.getResources().getString( in testGetPositiveButtonText()
78 CharSequence negativeButtonTextExp = mActivity.getResources().getString( in testGetNegativeButtonText()

1234567