Home
last modified time | relevance | path

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

1234

/cts/tests/app/src/android/app/cts/
DOrientationTestUtils.java31 public static void toggleOrientation(Activity activity) { in toggleOrientation() argument
32 toggleOrientationSync(activity, null); in toggleOrientation()
42 public static void toggleOrientationSync(final Activity activity, in toggleOrientationSync() argument
44 final int originalOrientation = activity.getResources().getConfiguration().orientation; in toggleOrientationSync()
48 changeOrientation(activity, instrumentation, newOrientation); in toggleOrientationSync()
49 changeOrientation(activity, instrumentation, originalOrientation); in toggleOrientationSync()
52 private static void changeOrientation(final Activity activity, in changeOrientation() argument
54 activity.setRequestedOrientation(orientation); in changeOrientation()
DLocalActivityManagerTestHelper.java94 Activity activity = mLocalActivityManager.getActivity(id); in testRemoveAllActivity() local
95 if (activity == null) { in testRemoveAllActivity()
100 if (!activity.getClass().getName().equals("android.app.cts." in testRemoveAllActivity()
107 activity = mLocalActivityManager.getActivity(id); in testRemoveAllActivity()
108 if (activity != null) { in testRemoveAllActivity()
273 Activity activity = mLocalActivityManager.getActivity(id); in testStartActivity() local
274 if (activity == null) { in testStartActivity()
280 activity = mLocalActivityManager.getActivity("null id"); in testStartActivity()
281 if (activity != null) { in testStartActivity()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DPassFailButtons.java268 void setPassFailClickListeners(final T activity) { in setPassFailClickListeners() argument
272 setTestResultAndFinish(activity, activity.getTestId(), activity.getTestDetails(), in setPassFailClickListeners()
273 activity.getReportLog(), target); in setPassFailClickListeners()
277 View passButton = activity.findViewById(R.id.pass_button); in setPassFailClickListeners()
282 Toast.makeText(activity, R.string.pass_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners()
287 View failButton = activity.findViewById(R.id.fail_button); in setPassFailClickListeners()
292 Toast.makeText(activity, R.string.fail_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners()
298 private static void setInfo(final android.app.Activity activity, final int titleId, in setInfo() argument
301 View infoButton = activity.findViewById(R.id.info_button); in setInfo()
306 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 private 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/view/src/android/view/cts/
DView_IdsTest.java37 Activity activity = getActivity(); in testIds() local
39 EditText editText = (EditText) activity.findViewById(R.id.entry); in testIds()
40 Button buttonOk = (Button) activity.findViewById(R.id.ok); in testIds()
41 Button buttonCancel = (Button) activity.findViewById(R.id.cancel); in testIds()
42 TextView symbol = (TextView) activity.findViewById(R.id.symbolball); in testIds()
43 TextView warning = (TextView) activity.findViewById(R.id.warning); in testIds()
51 assertEquals(activity.getString(R.string.id_ok), buttonOk.getText().toString()); in testIds()
52 assertEquals(activity.getString(R.string.id_cancel), buttonCancel.getText().toString()); in testIds()
56 assertSame(editText, (EditText) activity.findViewById(0x1111)); in testIds()
60 assertSame(buttonCancel, (Button) activity.findViewById(0x9999)); in testIds()
/cts/tests/tests/app/src/android/app/cts/
DInstrumentation_ActivityMonitorTest.java54 Activity activity = am.waitForActivity(); in testActivityMonitor() local
55 assertSame(activity, lastActivity); in testActivityMonitor()
57 assertTrue(activity instanceof InstrumentationTestActivity); in testActivityMonitor()
58 activity.finish(); in testActivityMonitor()
62 activity = null; in testActivityMonitor()
63 while (activity == null && System.currentTimeMillis() < timeout) { in testActivityMonitor()
65 activity = am.waitForActivityWithTimeout(WAIT_TIMEOUT); in testActivityMonitor()
67 assertNotNull(activity); in testActivityMonitor()
68 activity.finish(); in testActivityMonitor()
DApplicationTest.java40 final Activity activity = instrumentation.startActivitySync(intent); in testApplication() local
41 final MockApplication mockApp = (MockApplication) activity.getApplication(); in testApplication()
54 OrientationTestUtils.toggleOrientation(activity); in testApplication()
DInstrumentationTest.java97 Activity activity = mInstrumentation.waitForMonitorWithTimeout(monitor, WAIT_TIME); in testMonitor() local
98 assertTrue(activity instanceof InstrumentationTestActivity); in testMonitor()
100 activity.finish(); in testMonitor()
106 activity = mInstrumentation.waitForMonitorWithTimeout(monitor, WAIT_TIME); in testMonitor()
107 assertNull(activity); in testMonitor()
114 activity = am.waitForActivity(); in testMonitor()
115 assertTrue(activity instanceof InstrumentationTestActivity); in testMonitor()
116 activity.finish(); in testMonitor()
121 activity = am.waitForActivity(); in testMonitor()
122 assertTrue(activity instanceof InstrumentationTestActivity); in testMonitor()
[all …]
/cts/hostsidetests/theme/app/src/android/theme/app/
DReferenceImagesTest.java35 final GenerateImagesActivity activity = getActivity(); in testGenerateReferenceImages() local
36 activity.waitForCompletion(); in testGenerateReferenceImages()
38 assertTrue(activity.getFinishReason(), activity.isFinishSuccess()); in testGenerateReferenceImages()
40 final File outputDir = activity.getOutputDir(); in testGenerateReferenceImages()
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DNativeMediaTest.java75 final NativeMediaActivity activity = getActivity(); in runPlayTest() local
77 waitForNativeMediaLifeCycle(activity, true); in runPlayTest()
80 instrumentation.callActivityOnPause(activity); in runPlayTest()
82 waitForNativeMediaLifeCycle(activity, false); in runPlayTest()
83 instrumentation.callActivityOnResume(activity); in runPlayTest()
84 waitForNativeMediaLifeCycle(activity, true); in runPlayTest()
95 private void waitForNativeMediaLifeCycle(NativeMediaActivity activity, boolean expectAlive) in waitForNativeMediaLifeCycle() argument
97 Boolean status = activity.waitForNativeMediaLifeCycle(); in waitForNativeMediaLifeCycle()
/cts/suite/cts/deviceTests/opengl/src/com/android/cts/opengl/reference/
DGLReferenceBenchmark.java48 GLReferenceActivity activity = null; in testReferenceBenchmark() local
50 activity = getActivity(); in testReferenceBenchmark()
51 if (activity != null) { in testReferenceBenchmark()
52 activity.waitForCompletion(); in testReferenceBenchmark()
54 double[] setUpTimes = activity.mSetUpTimes; in testReferenceBenchmark()
55 double[] updateTimes = activity.mUpdateTimes; in testReferenceBenchmark()
56 double[] renderTimes = activity.mRenderTimes; in testReferenceBenchmark()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/os/
DTimeoutResetActivity.java69 public static void turnOffScreen(final Activity activity) { in turnOffScreen() argument
70 activity.runOnUiThread(new Runnable() { in turnOffScreen()
73 WindowManager.LayoutParams params = activity.getWindow().getAttributes(); in turnOffScreen()
82 activity.getWindow().setAttributes(params); in turnOffScreen()
84 ((AlarmManager) activity.getSystemService(ALARM_SERVICE)).setExact( in turnOffScreen()
88 activity.getApplicationContext(), in turnOffScreen()
90 new Intent(activity, TimeoutResetActivity.class) in turnOffScreen()
/cts/tests/tests/media/src/android/media/cts/
DMediaPlayerSurfaceTest.java32 MediaPlayerSurfaceStubActivity activity = launchActivity("com.android.cts.media", in testSetSurface() local
34 activity.playVideo(); in testSetSurface()
35 activity.finish(); in testSetSurface()
DResourceManagerTest.java31 ResourceManagerStubActivity activity = launchActivity( in doTestReclaimResource() local
33 activity.testReclaimResource(type1, type2); in doTestReclaimResource()
34 activity.finish(); in doTestReclaimResource()
/cts/tools/cts-holo-generation/src/com/android/cts/holo_capture/
DCaptureHolo.java30 CaptureActivity activity = getActivity(); in testCaptureHolo() local
32 (KeyguardManager) activity.getSystemService(Context.KEYGUARD_SERVICE); in testCaptureHolo()
34 activity.waitForCompletion(); in testCaptureHolo()
/cts/tests/tests/content/src/android/content/cts/
DBroadcastReceiverTest.java158 final MockActivity activity = getActivity(); in testOnReceive() local
163 activity.registerReceiver(internalReceiver, filter); in testOnReceive()
169 activity.sendBroadcast(new Intent(ACTION_BROADCAST_INTERNAL)); in testOnReceive()
172 activity.unregisterReceiver(internalReceiver); in testOnReceive()
253 final MockActivity activity = getActivity(); in testPeekService() local
258 activity.registerReceiver(internalReceiver, filter); in testPeekService()
260 activity.sendBroadcast(new Intent(ACTION_BROADCAST_INTERNAL)); in testPeekService()
264 Intent intent = new Intent(activity, MockService.class); in testPeekService()
266 assertTrue(activity.bindService(intent, msc, Service.BIND_AUTO_CREATE)); in testPeekService()
270 activity.sendBroadcast(new Intent(ACTION_BROADCAST_INTERNAL)); in testPeekService()
[all …]
/cts/tests/tests/theme/src/android/theme/cts/
DDeviceDefaultTest.java125 Activity activity = startActivity(themeId); in assertGetActionBar() local
126 if (activity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { in assertGetActionBar()
127 assertNull(activity.getActionBar()); in assertGetActionBar()
131 assertNotNull(activity.getActionBar()); in assertGetActionBar()
133 assertNull(activity.getActionBar()); in assertGetActionBar()
138 Activity activity = startActivity(themeId); in assertActionBarWhenLarge() local
139 if (isLargeScreen(activity)) { in assertActionBarWhenLarge()
/cts/tests/tests/graphics/src/android/opengl/cts/
DCompressedTextureTest.java33 CompressedTextureCtsActivity activity = launchActivity("com.android.cts.graphics", in launchTest() local
35 activity.finish(); in launchTest()
36 assertTrue(activity.getPassed()); in launchTest()
/cts/tests/tests/opengl/src/android/opengl/cts/
DProgramTest.java35 OpenGLES20ActivityOne activity = getActivity(); in getShaderActivity() local
36 assertTrue(activity.waitForFrameDrawn()); in getShaderActivity()
37 return activity; in getShaderActivity()
/cts/tests/tests/widget/src/android/widget/cts/
DTableRowTest.java85 TableCtsActivity activity = getActivity(); in testGetVirtualChildAt() local
86 activity.setContentView(com.android.cts.widget.R.layout.table_layout_1); in testGetVirtualChildAt()
87 TableLayout tableLayout = (TableLayout) activity in testGetVirtualChildAt()
91 Resources resources = activity.getResources(); in testGetVirtualChildAt()
99 activity.setContentView(com.android.cts.widget.R.layout.table_layout_2); in testGetVirtualChildAt()
100 tableLayout = (TableLayout) activity.findViewById(com.android.cts.widget.R.id.table2); in testGetVirtualChildAt()
116 TableCtsActivity activity = getActivity(); in testGetVirtualChildCount() local
117 activity.setContentView(com.android.cts.widget.R.layout.table_layout_1); in testGetVirtualChildCount()
118 TableLayout tableLayout = (TableLayout) activity in testGetVirtualChildCount()
124 activity.setContentView(com.android.cts.widget.R.layout.table_layout_2); in testGetVirtualChildCount()
[all …]
DRelativeLayout_LayoutParamsTest.java55 RelativeLayoutCtsActivity activity = getActivity(); in testConstructor() local
58 RelativeLayout relativeLayout = (RelativeLayout) activity.findViewById( in testConstructor()
63 View view1 = activity.findViewById(R.id.relative_view1); in testConstructor()
72 View view2 = activity.findViewById(R.id.relative_view2); in testConstructor()
83 View view3 = activity.findViewById(R.id.relative_view3); in testConstructor()
95 View view4 = activity.findViewById(R.id.relative_view4); in testConstructor()
105 View view5 = activity.findViewById(R.id.relative_view5); in testConstructor()
115 View view6 = activity.findViewById(R.id.relative_view6); in testConstructor()
125 View view7 = activity.findViewById(R.id.relative_view7); in testConstructor()
135 View view8 = activity.findViewById(R.id.relative_view8); in testConstructor()
[all …]
DExpandableListViewWithHeadersTest.java41 final ExpandableListWithHeaders activity = getActivity(); in setUp() local
45 return activity.hasWindowFocus(); in setUp()
48 mExpandableListView = activity.getExpandableListView(); in setUp()
/cts/tests/uiautomator/test-apps/CtsUiAutomatorApp/src/com/android/cts/uiautomator/
DTestListFragment.java62 public void onAttach(Activity activity) { in onAttach() argument
63 super.onAttach(activity); in onAttach()
64 if (!(activity instanceof Callbacks)) { in onAttach()
68 mCallbacks = (Callbacks) activity; in onAttach()
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/
DUiAutomationTest.java47 Activity activity = null; in testWindowContentFrameStats() local
55 activity = getInstrumentation().startActivitySync(intent); in testWindowContentFrameStats()
98 if (activity != null) { in testWindowContentFrameStats()
99 activity.finish(); in testWindowContentFrameStats()
105 Activity activity = null; in testWindowContentFrameStatsNoAnimation() local
113 activity = getInstrumentation().startActivitySync(intent); in testWindowContentFrameStatsNoAnimation()
147 if (activity != null) { in testWindowContentFrameStatsNoAnimation()
148 activity.finish(); in testWindowContentFrameStatsNoAnimation()
/cts/suite/cts/deviceTests/ui/src/com/android/cts/ui/
DScrollingTest.java60 final ScrollingActivity activity = mActivity; in testFullScrolling() local
65 assertTrue(activity.scrollToBottom()); in testFullScrolling()
66 assertTrue(activity.scrollToTop()); in testFullScrolling()

1234