Home
last modified time | relevance | path

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

12345

/cts/hostsidetests/incident/apps/graphicsstatsapp/src/com/android/server/cts/device/graphicsstats/
DSimpleDrawFrameTests.java41 DrawFramesActivity activity = mActivityRule.getActivity(); in testDrawTenFrames() local
42 activity.waitForReady(); in testDrawTenFrames()
43 assertEquals(1, activity.getRenderedFramesCount()); in testDrawTenFrames()
44 assertEquals(0, activity.getDroppedReportsCount()); in testDrawTenFrames()
45 activity.drawFrames(10); in testDrawTenFrames()
46 assertEquals(11, activity.getRenderedFramesCount()); in testDrawTenFrames()
47 assertEquals(0, activity.getDroppedReportsCount()); in testDrawTenFrames()
52 DrawFramesActivity activity = mActivityRule.getActivity(); in testDrawJankyFrames() local
53 activity.waitForReady(); in testDrawJankyFrames()
54 assertEquals(1, activity.getRenderedFramesCount()); in testDrawJankyFrames()
[all …]
/cts/tests/app/app/src/android/app/stubs/
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()
58 public static void switchOrientation(final Activity activity, Instrumentation instrumentation) { in switchOrientation() argument
59 final int originalOrientation = activity.getResources().getConfiguration().orientation; in switchOrientation()
63 changeOrientation(activity, instrumentation, newOrientation); in switchOrientation()
66 private static void changeOrientation(final Activity activity, in changeOrientation() argument
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DPassFailButtons.java272 void setPassFailClickListeners(final T activity) { in setPassFailClickListeners() argument
276 setTestResultAndFinish(activity, activity.getTestId(), activity.getTestDetails(), in setPassFailClickListeners()
277 activity.getReportLog(), target); in setPassFailClickListeners()
281 View passButton = activity.findViewById(R.id.pass_button); in setPassFailClickListeners()
286 Toast.makeText(activity, R.string.pass_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners()
291 View failButton = activity.findViewById(R.id.fail_button); in setPassFailClickListeners()
296 Toast.makeText(activity, R.string.fail_button_text, Toast.LENGTH_SHORT).show(); in setPassFailClickListeners()
302 protected static void setInfo(final android.app.Activity activity, final int titleId, in setInfo() argument
305 View infoButton = activity.findViewById(R.id.info_button); in setInfo()
310 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.java46 Activity activity; in testIds() local
47 activity = mActivityRule.getActivity(); in testIds()
49 EditText editText = (EditText) activity.findViewById(R.id.entry); in testIds()
50 Button buttonOk = (Button) activity.findViewById(R.id.ok); in testIds()
51 Button buttonCancel = (Button) activity.findViewById(R.id.cancel); in testIds()
52 TextView symbol = (TextView) activity.findViewById(R.id.symbolball); in testIds()
53 TextView warning = (TextView) activity.findViewById(R.id.warning); in testIds()
61 assertEquals(activity.getString(R.string.id_ok), buttonOk.getText().toString()); in testIds()
62 assertEquals(activity.getString(R.string.id_cancel), buttonCancel.getText().toString()); in testIds()
66 assertSame(editText, (EditText) activity.findViewById(0x1111)); in testIds()
[all …]
DView_DefaultFocusHighlightTest.java54 Activity activity = mActivityRule.getActivity(); in testSettersAndGetters() local
55 if (!activity.getResources().getBoolean( in testSettersAndGetters()
61 View view = activity.findViewById(R.id.view); in testSettersAndGetters()
62 ListView listView = (ListView) activity.findViewById(R.id.listview); in testSettersAndGetters()
63 EditText editText = (EditText) activity.findViewById(R.id.edittext); in testSettersAndGetters()
64 Button button = (Button) activity.findViewById(R.id.button); in testSettersAndGetters()
65 LinearLayout linearLayout = (LinearLayout) activity.findViewById(R.id.linearlayout); in testSettersAndGetters()
89 Activity activity = mActivityRule.getActivity(); in testInflating() local
90 if (!activity.getResources().getBoolean( in testInflating()
96 View view = activity.findViewById(R.id.view_to_inflate); in testInflating()
[all …]
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()
233 Activity activity = mActivityRule.getActivity(); in testFocusAuto() local
235 activity.getLayoutInflater().inflate(R.layout.focus_handling_auto_layout, in testFocusAuto()
236 (ViewGroup) activity.findViewById(R.id.auto_test_area)); in testFocusAuto()
238 View def = activity.findViewById(R.id.focusabledefault); in testFocusAuto()
239 View auto = activity.findViewById(R.id.focusableauto); in testFocusAuto()
[all …]
DPixelCopyTest.java151 PixelCopyGLProducerCtsActivity activity = in waitForGlProducerActivity() local
153 activity.setSwapFence(swapFence); in waitForGlProducerActivity()
157 activity.getView().requestRender(); in waitForGlProducerActivity()
162 return activity; in waitForGlProducerActivity()
167 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerFullsize() local
169 int result = mCopyHelper.request(activity.getView(), bitmap); in testGlProducerFullsize()
180 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerCropTopLeft() local
182 int result = mCopyHelper.request(activity.getView(), new Rect(0, 0, 50, 50), bitmap); in testGlProducerCropTopLeft()
190 PixelCopyGLProducerCtsActivity activity = waitForGlProducerActivity(); in testGlProducerCropCenter() local
192 int result = mCopyHelper.request(activity.getView(), new Rect(25, 25, 75, 75), bitmap); in testGlProducerCropCenter()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/
DUtils.java43 static TestListItem createInteractiveTestItem(Activity activity, String id, int titleRes, in createInteractiveTestItem() argument
45 return TestListItem.newTest(activity, titleRes, in createInteractiveTestItem()
46 id, new Intent(activity, IntentDrivenTestActivity.class) in createInteractiveTestItem()
54 static TestListItem createInteractiveTestItem(Activity activity, String id, int titleRes, in createInteractiveTestItem() argument
56 return createInteractiveTestItem(activity, id, titleRes, infoRes, in createInteractiveTestItem()
71 static void provisionManagedProfile(Activity activity, ComponentName admin, int requestCode) { in provisionManagedProfile() argument
74 if (sending.resolveActivity(activity.getPackageManager()) != null) { in provisionManagedProfile()
75 activity.startActivityForResult(sending, requestCode); in provisionManagedProfile()
77 showToast(activity, R.string.provisioning_byod_disabled); in provisionManagedProfile()
112 static void setScreenLock(Activity activity, int requestCode) { in setScreenLock() argument
[all …]
/cts/tests/fragment/src/android/fragment/cts/
DLoaderTest.java60 LoaderActivity activity = FragmentTestUtil.recreateActivity(mActivityRule, in testLeak() local
63 FragmentManager fm = activity.getFragmentManager(); in testLeak()
81 activity = FragmentTestUtil.recreateActivity(mActivityRule, activity); in testLeak()
98 LoaderActivity activity = mActivityRule.getActivity(); in startWhenReused() local
100 assertEquals("Loaded!", activity.textView.getText().toString()); in startWhenReused()
102 activity = FragmentTestUtil.recreateActivity(mActivityRule, activity); in startWhenReused()
105 assertEquals("Loaded!", activity.textView.getText().toString()); in startWhenReused()
113 final LoaderActivity activity = mActivityRule.getActivity(); in noStaleData() local
122 activity.getLoaderManager().initLoader(DELAY_LOADER, null, in noStaleData()
126 return new AsyncTaskLoader<String>(activity) { in noStaleData()
[all …]
DHostCallbacks.java25 public HostCallbacks(FragmentTestActivity activity, Handler handler, int windowAnimations) { in HostCallbacks() argument
26 super(activity, handler, windowAnimations); in HostCallbacks()
27 mActivity = activity; in HostCallbacks()
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DNativeMediaTest.java68 final NativeMediaActivity activity = getActivity(); in runPlayTest() local
70 waitForNativeMediaLifeCycle(activity, true); in runPlayTest()
74 instrumentation.callActivityOnPause(activity); in runPlayTest()
77 waitForNativeMediaLifeCycle(activity, false); in runPlayTest()
79 instrumentation.callActivityOnResume(activity); in runPlayTest()
81 waitForNativeMediaLifeCycle(activity, true); in runPlayTest()
92 private void waitForNativeMediaLifeCycle(NativeMediaActivity activity, boolean expectAlive) in waitForNativeMediaLifeCycle() argument
94 Boolean status = activity.waitForNativeMediaLifeCycle(); in waitForNativeMediaLifeCycle()
/cts/hostsidetests/theme/app/src/android/theme/app/
DReferenceImagesTest.java38 final GenerateImagesActivity activity = getActivity(); in testGenerateReferenceImages() local
40 activity.waitForCompletion(TEST_RESULT_TIMEOUT)); in testGenerateReferenceImages()
41 assertTrue(activity.getFinishReason(), activity.isFinishSuccess()); in testGenerateReferenceImages()
43 final File outputZip = activity.getOutputZip(); in testGenerateReferenceImages()
/cts/tests/openglperf2/src/android/opengl2/cts/reference/
DGLReferenceBenchmark.java47 GLReferenceActivity activity = null; in testReferenceBenchmark() local
49 activity = getActivity(); in testReferenceBenchmark()
50 if (activity != null) { in testReferenceBenchmark()
51 activity.waitForCompletion(); in testReferenceBenchmark()
53 double[] setUpTimes = activity.mSetUpTimes; in testReferenceBenchmark()
54 double[] updateTimes = activity.mUpdateTimes; in testReferenceBenchmark()
55 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/app/src/android/app/cts/
DApplicationTest.java42 final Activity activity = instrumentation.startActivitySync(intent); in testApplication() local
43 final MockApplication mockApp = (MockApplication) activity.getApplication(); in testApplication()
56 OrientationTestUtils.toggleOrientation(activity); in testApplication()
60 final boolean isInMultiwindowMode = activity.isInMultiWindowMode(); in testApplication()
61 if (activity.isInMultiWindowMode()) { in testApplication()
/cts/tests/tests/theme/src/android/theme/cts/
DDeviceDefaultTest.java127 Activity activity = startActivity(themeId); in assertGetActionBar() local
128 if (activity.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { in assertGetActionBar()
129 assertNull(activity.getActionBar()); in assertGetActionBar()
133 assertNotNull(activity.getActionBar()); in assertGetActionBar()
135 assertNull(activity.getActionBar()); in assertGetActionBar()
140 Activity activity = startActivity(themeId); in assertActionBarWhenLarge() local
141 if (isLargeScreen(activity)) { in assertActionBarWhenLarge()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DTimePickerTestCase.java54 final T activity = getTimePickerActivity(); in testAutoFillAndSave() local
73 activity.expectAutoFill("4:20", 4, 20); in testAutoFillAndSave()
76 activity.onOutput((v) -> v.requestFocus()); in testAutoFillAndSave()
86 activity.assertAutoFilled(); in testAutoFillAndSave()
89 activity.setTime(10, 40); in testAutoFillAndSave()
90 activity.tapOk(); in testAutoFillAndSave()
DDatePickerTestCase.java54 final T activity = getDatePickerActivity(); in testAutoFillAndSave() local
73 activity.expectAutoFill("2012/11/20", 2012, 11, 20); in testAutoFillAndSave()
76 activity.onOutput((v) -> v.requestFocus()); in testAutoFillAndSave()
87 activity.assertAutoFilled(); in testAutoFillAndSave()
90 activity.setDate(2010, 11, 12); in testAutoFillAndSave()
91 activity.tapOk(); in testAutoFillAndSave()
/cts/tests/tests/content/src/android/content/cts/
DBroadcastReceiverTest.java170 final MockActivity activity = getActivity(); in testOnReceive() local
175 activity.registerReceiver(internalReceiver, filter); in testOnReceive()
181 activity.sendBroadcast(new Intent(ACTION_BROADCAST_INTERNAL) in testOnReceive()
185 activity.unregisterReceiver(internalReceiver); in testOnReceive()
353 final MockActivity activity = getActivity(); in testPeekService() local
358 activity.registerReceiver(internalReceiver, filter); in testPeekService()
360 activity.sendBroadcast(new Intent(ACTION_BROADCAST_INTERNAL) in testPeekService()
365 Intent intent = new Intent(activity, MockService.class); in testPeekService()
367 assertTrue(activity.bindService(intent, msc, Service.BIND_AUTO_CREATE)); in testPeekService()
371 activity.sendBroadcast(new Intent(ACTION_BROADCAST_INTERNAL) in testPeekService()
[all …]
/cts/tests/tests/preference2/src/android/preference2/cts/
DTestUtils.java152 void enterMultiWindow(Activity activity) { in enterMultiWindow() argument
154 int id = getActivityTaskId(activity); in enterMultiWindow()
162 void leaveMultiWindow(Activity activity) { in leaveMultiWindow() argument
164 int id = getActivityTaskId(activity); in leaveMultiWindow()
172 private int getActivityTaskId(Activity activity) throws IOException { in getActivityTaskId() argument
176 Pattern.compile("(.*) " + getWindowName(activity) + " (.*)"); in getActivityTaskId()
191 private String getWindowName(Activity activity) { in getWindowName() argument
192 String componentName = activity.getPackageName(); in getWindowName()
194 return baseWindowName + activity.getClass().getSimpleName(); in getWindowName()
/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/media/src/android/media/cts/
DMediaPlayerSurfaceTest.java36 MediaPlayerSurfaceStubActivity activity = launchActivity("android.media.cts", in testSetSurface() local
38 activity.playVideo(); in testSetSurface()
39 activity.finish(); in testSetSurface()
/cts/hostsidetests/services/activityandwindowmanager/util/src/android/server/cts/
DActivityManagerState.java258 for (Activity activity : task.mActivities) { in containsActivity()
259 if (activity.name.equals(activityName)) { in containsActivity()
271 for (Activity activity : task.mActivities) { in isActivityVisible()
272 if (activity.name.equals(activityName)) { in isActivityVisible()
273 return activity.visible; in isActivityVisible()
285 for (Activity activity : task.mActivities) { in hasActivityState()
286 if (activity.name.equals(fullName)) { in hasActivityState()
287 return activity.state.equals(activityState); in hasActivityState()
298 for (Activity activity : task.mActivities) { in getActivityProcId()
299 if (activity.name.equals(activityName)) { in getActivityProcId()
[all …]
/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()

12345