Home
last modified time | relevance | path

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

123

/external/robolectric-shadows/shadows/supportv4/src/test/java/org/robolectric/shadows/support/v4/
DSupportFragmentControllerTest.java32 assertThat(fragment.getActivity()).isNull(); in initialNotAttached()
42 assertThat(fragment.getActivity()).isNull(); in initialNotAttached_customActivity()
51 assertThat(fragment.getActivity()).isNotNull(); in attachedAfterCreate()
61 assertThat(fragment.getActivity()).isNotNull(); in attachedAfterCreate_customActivity()
62 assertThat(fragment.getActivity()).isInstanceOf(LoginActivity.class); in attachedAfterCreate_customActivity()
73 assertThat(fragment.getActivity()).isNotNull(); in attachedAfterCreate_customizedViewId()
93 assertThat(fragment.getActivity()).isNotNull(); in isResumed()
105 assertThat(fragment.getActivity()).isNotNull(); in isPaused()
119 assertThat(fragment.getActivity()).isNotNull(); in isStopped()
137 Intent intentInFragment = controller.get().getActivity().getIntent(); in withIntent()
[all …]
DSupportFragmentTestUtilTest.java29 assertThat(fragment.getActivity()).isNotNull(); in startFragment_shouldStartSupportFragment()
39 assertThat(fragment.getActivity()).isNotNull(); in startVisibleFragment_shouldStartSupportFragment()
57 assertThat(fragment.getActivity()).isNotNull(); in startFragment_shouldStartSupportFragmentWithSpecifiedActivityClass()
59 assertThat(fragment.getActivity()).isInstanceOf(LoginFragmentActivity.class); in startFragment_shouldStartSupportFragmentWithSpecifiedActivityClass()
68 assertThat(fragment.getActivity()).isNotNull(); in startVisibleFragment_shouldStartSupportFragmentWithSpecifiedActivityClass()
70 assertThat(fragment.getActivity()).isInstanceOf(LoginFragmentActivity.class); in startVisibleFragment_shouldStartSupportFragmentWithSpecifiedActivityClass()
79 assertThat(fragment.getActivity()).isInstanceOf(LoginFragmentActivity.class); in startVisibleFragment_shouldAttachSupportFragmentToActivityWithSpecifiedActivityClass()
DShadowDialogFragmentTest.java59 assertNotNull(dialogFragment.getActivity()); in show_shouldCallLifecycleMethods()
78 assertNotNull(dialogFragment.getActivity()); in show_whenPassedATransaction_shouldCallShowWithManager()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/
DFragmentTestUtilTest.java28 assertThat(fragment.getActivity()).isNotNull(); in startFragment_shouldStartFragment()
38 assertThat(fragment.getActivity()).isNotNull(); in startVisibleFragment_shouldStartFragment()
56 assertThat(fragment.getActivity()).isNotNull(); in startFragment_shouldStartFragmentWithSpecifiedActivityClass()
58 assertThat(fragment.getActivity()).isInstanceOf(LoginActivity.class); in startFragment_shouldStartFragmentWithSpecifiedActivityClass()
67 assertThat(fragment.getActivity()).isNotNull(); in startVisibleFragment_shouldStartFragmentWithSpecifiedActivityClass()
69 assertThat(fragment.getActivity()).isInstanceOf(LoginActivity.class); in startVisibleFragment_shouldStartFragmentWithSpecifiedActivityClass()
78 assertThat(fragment.getActivity()).isInstanceOf(LoginActivity.class); in startVisibleFragment_shouldAttachFragmentToActivityWithSpecifiedActivityClass()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/controller/
DFragmentControllerTest.java32 assertThat(fragment.getActivity()).isNull(); in initialNotAttached()
42 assertThat(fragment.getActivity()).isNull(); in initialNotAttached_customActivity()
52 assertThat(fragment.getActivity()).isNotNull(); in attachedAfterCreate()
64 assertThat(fragment.getActivity()).isNotNull(); in attachedAfterCreate_customizedViewId()
76 assertThat(fragment.getActivity()).isNotNull(); in attachedAfterCreate_customActivity()
77 assertThat(fragment.getActivity()).isInstanceOf(LoginActivity.class); in attachedAfterCreate_customActivity()
89 assertThat(fragment.getActivity()).isNotNull(); in isResumed()
100 assertThat(fragment.getActivity()).isNotNull(); in isPaused()
114 assertThat(fragment.getActivity()).isNotNull(); in isStopped()
132 Intent intentInFragment = controller.get().getActivity().getIntent(); in withIntent()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowPendingIntentTest.java57 PendingIntent pendingIntent = PendingIntent.getActivity(context, 99, intent, 100); in getActivity_shouldCreateIntentForBroadcast()
158 PendingIntent pendingIntent = PendingIntent.getActivity(context, 99, intent, 100); in send_shouldFillInIntentData()
174 PendingIntent pendingIntent = PendingIntent.getActivity(context, 99, intent, 100); in send_shouldNotReusePreviouslyFilledInIntentData()
246 PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, FLAG_IMMUTABLE); in send_shouldNotFillIn_whenPendingIntentIsImmutable()
277 assertThat(PendingIntent.getActivity(context, 99, intent, FLAG_NO_CREATE)).isNull(); in getActivity_withFlagNoCreate_shouldReturnNullIfNoPendingIntentExists()
283 PendingIntent.getActivity(context, 99, intent, 0); in getActivity_withFlagNoCreate_shouldReturnNullIfRequestCodeIsUnmatched()
284 assertThat(PendingIntent.getActivity(context, 98, intent, FLAG_NO_CREATE)).isNull(); in getActivity_withFlagNoCreate_shouldReturnNullIfRequestCodeIsUnmatched()
290 PendingIntent.getActivity(context, 99, intent, 100); in getActivity_withFlagNoCreate_shouldReturnExistingIntent()
293 PendingIntent saved = PendingIntent.getActivity(context, 99, identical, FLAG_NO_CREATE); in getActivity_withFlagNoCreate_shouldReturnExistingIntent()
301 PendingIntent.getActivity(context, 99, intent, 100); in getActivity_withNoFlags_shouldReturnExistingIntent()
[all …]
DShadowAlarmManagerTest.java105 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in set_shouldRegisterAlarm()
123 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in setAndAllowWhileIdle_shouldRegisterAlarm()
132 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in setExactAndAllowWhileIdle_shouldRegisterAlarm()
141 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in setExact_shouldRegisterAlarm_forApi19()
159 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in setWindow_shouldRegisterAlarm_forApi19()
176 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in setRepeating_shouldRegisterAlarm()
183 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in set_shouldReplaceAlarmsWithSameIntentReceiver()
185 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in set_shouldReplaceAlarmsWithSameIntentReceiver()
192 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in set_shouldReplaceDuplicates()
194 PendingIntent.getActivity(activity, 0, new Intent(activity, activity.getClass()), 0)); in set_shouldReplaceDuplicates()
[all …]
DShadowSmsManagerTest.java82 PendingIntent.getActivity(ApplicationProvider.getApplicationContext(), 10, null, 0); in sendDataMessage_shouldStoreLastParameters()
84 PendingIntent.getActivity(ApplicationProvider.getApplicationContext(), 10, null, 0); in sendDataMessage_shouldStoreLastParameters()
/external/robolectric-shadows/shadows/androidx/fragment/src/test/java/org/robolectric/shadows/androidx/fragment/
DFragmentControllerTest.java36 assertThat(controller.get().getActivity()).isNull(); in initialNotAttached()
46 assertThat(controller.get().getActivity()).isNull(); in initialNotAttached_customActivity()
57 assertThat(controller.get().getActivity()).isNotNull(); in attachedAfterCreate()
69 assertThat(controller.get().getActivity()).isNotNull(); in attachedAfterCreate_customActivity()
70 assertThat(controller.get().getActivity()).isInstanceOf(TestActivity.class); in attachedAfterCreate_customActivity()
83 assertThat(controller.get().getActivity()).isNotNull(); in attachedAfterCreate_customizedViewId()
107 assertThat(controller.get().getActivity()).isNotNull(); in isResumed()
121 assertThat(controller.get().getActivity()).isNotNull(); in isPaused()
137 assertThat(controller.get().getActivity()).isNotNull(); in isStopped()
152 final Intent intentInFragment = controller.get().getActivity().getIntent(); in withIntent()
[all …]
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/ui/
DFullScreenTask.java77 mView = mInflater.inflate(getActivity(), xml); in onCreate()
84 getActivity().setContentView(mView); in onCreate()
85 getActivity().setTitle(mTitle); in onCreate()
98 LinearLayout result = new LinearLayout(getActivity()); in defaultView()
100 TextView text = new TextView(getActivity()); in defaultView()
103 Button b = new Button(getActivity()); in defaultView()
199 view = inflater.inflate(getActivity(), xml); in loadLayout()
202 getActivity().setContentView(mView); in loadLayout()
276 getActivity().setTitle(mSetTitle); in run()
DSeekBarDialogTask.java64 mSeekBar = new SeekBar(getActivity()); in onCreate()
95 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreate()
103 configureButtons(builder, getActivity()); in onCreate()
104 addOnCancelListener(builder, getActivity()); in onCreate()
DAlertDialogTask.java170 AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); in onCreate()
220 mEditText = new EditText(getActivity()); in onCreate()
228 mEditText = new EditText(getActivity()); in onCreate()
236 configureButtons(builder, getActivity()); in onCreate()
237 addOnCancelListener(builder, getActivity()); in onCreate()
/external/setupcompat/main/java/com/google/android/setupcompat/internal/
DLifecycleFragment.java92 metricKey = MetricKey.get("ScreenDuration", getActivity()); in onAttach()
98 SetupMetricsLogger.logDuration(getActivity(), metricKey, NANOSECONDS.toMillis(durationInNanos)); in onDetach()
119 getActivity(), in logScreenResume()
120 CustomEvent.create(MetricKey.get("ScreenActivity", getActivity()), bundle)); in logScreenResume()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DRequestManagerRetriever.java108 if (fragment.getActivity() == null) { in get()
112 return get(fragment.getActivity().getApplicationContext()); in get()
118 return supportFragmentGet(fragment.getActivity(), fm); in get()
142 if (fragment.getActivity() == null) { in get()
146 return get(fragment.getActivity().getApplicationContext()); in get()
150 return fragmentGet(fragment.getActivity(), fm); in get()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/bluetooth/
DBluetoothHidInputCounterTask.java58 View view = inflater.inflate(getActivity(), xml); in onCreate()
59 getActivity().setContentView(view); in onCreate()
63 getActivity().setTitle(TITLE); in onCreate()
/external/sl4a/Common/src/com/googlecode/android_scripting/interpreter/html/
DHtmlActivityTask.java142 mView = new WebView(getActivity()); in onCreate()
154 getActivity().setContentView(mView); in onCreate()
155 mView.setOnCreateContextMenuListener(getActivity()); in onCreate()
156 mChromeClient = new ChromeClient(getActivity()); in onCreate()
240 Activity parent = getActivity(); in dismiss()
268 getActivity().runOnUiThread(new Runnable() { in onEventReceived()
280 Activity parent = getActivity(); in dismiss()
/external/tensorflow/tensorflow/lite/java/demo/app/src/main/java/com/example/android/tflitecamerademo/
DCamera2BasicFragment.java177 Activity activity = getActivity();
242 final Activity activity = getActivity(); in showToast()
355 classifier = new ImageClassifierQuantizedMobileNet(getActivity()); in updateActiveModel()
357 classifier = new ImageClassifierFloatMobileNet(getActivity()); in updateActiveModel()
492 Activity activity = getActivity(); in setUpCameraOutputs()
595 Activity activity = getActivity(); in getRequiredPermissions()
622 Activity activity = getActivity(); in openCamera()
638 if (getActivity().checkPermission(permission, Process.myPid(), Process.myUid()) in allPermissionsGranted()
782 Activity activity = getActivity(); in configureTransform()
809 if (classifier == null || getActivity() == null || cameraDevice == null) { in classifyFrame()
[all …]
/external/angle/src/android_system_settings/src/com/android/angle/common/
DMainFragment.java69 getActivity().getApplicationContext()); in onCreate()
88 getActivity().registerReceiver(mRefreshReceiver, in onResume()
98 getActivity().unregisterReceiver(mRefreshReceiver); in onPause()
206 List<PackageInfo> pkgs = getActivity().getPackageManager().getInstalledPackages(0); in getInstalledPkgsList()
240 return packageInfo.applicationInfo.loadLabel(getActivity().getPackageManager()).toString(); in getAppName()
/external/libtextclassifier/notification/tests/src/com/android/textclassifier/notification/
DNotificationUtilsTest.java94 PendingIntent.getActivity( in hasInlineReply_positive()
101 PendingIntent.getActivity( in hasInlineReply_positive()
122 PendingIntent.getActivity( in hasInlineReply_negative()
/external/exoplayer/tree/extensions/ima/src/androidTest/java/com/google/android/exoplayer2/ext/ima/
DImaPlaybackTest.java78 TestUtil.getString(/* context= */ testRule.getActivity(), PREROLL_ADS_RESPONSE_FILE_NAME); in playbackWithPrerollAdTag_playsAdAndContent()
82 testRule.getActivity().runTest(hostedTest, TIMEOUT_MS); in playbackWithPrerollAdTag_playsAdAndContent()
89 TestUtil.getString(/* context= */ testRule.getActivity(), MIDROLL_ADS_RESPONSE_FILE_NAME); in playbackWithMidrolls_playsAdAndContent()
93 testRule.getActivity().runTest(hostedTest, TIMEOUT_MS); in playbackWithMidrolls_playsAdAndContent()
/external/tensorflow/tensorflow/tools/android/test/src/org/tensorflow/demo/
DCameraConnectionFragment.java177 final Activity activity = getActivity();
247 final Activity activity = getActivity(); in showToast()
364 final Activity activity = getActivity(); in setUpCameraOutputs()
416 final Activity activity = getActivity(); in openCamera()
573 final Activity activity = getActivity(); in configureTransform()
626 final Activity activity = getActivity(); in onCreateDialog()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/
DCameraFacade.java131 final SurfaceView view = new SurfaceView(getActivity()); in setPreviewDisplay()
132 getActivity().setContentView(view); in setPreviewDisplay()
133 getActivity().getWindow().setSoftInputMode( in setPreviewDisplay()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/media/
DMediaRecorderFacade.java236 final SurfaceView view = new SurfaceView(getActivity()); in prepare()
237 getActivity().setContentView(view); in prepare()
238 getActivity().getWindow().setSoftInputMode( in prepare()
/external/exoplayer/tree/playbacktests/src/androidTest/java/com/google/android/exoplayer2/playbacktests/gts/
DDashDownloadTest.java64 new DashTestRunner(TAG, testRule.getActivity()) in setUp()
70 tempFolder = Util.createTempDirectory(testRule.getActivity(), "ExoPlayerTest"); in setUp()
/external/sl4a/Common/src/com/googlecode/android_scripting/facade/webcam/
DWebCamFacade.java339 final SurfaceView view = new SurfaceView(getActivity()); in createPreviewTask()
340 getActivity().setContentView(view); in createPreviewTask()
341 getActivity().getWindow().setSoftInputMode( in createPreviewTask()

123