Home
last modified time | relevance | path

Searched refs:fragment (Results 1 – 25 of 169) sorted by relevance

1234567

/frameworks/base/packages/SettingsLib/tests/robotests/fragment/src/main/java/org/robolectric/shadows/androidx/fragment/
DFragmentController.java17 package org.robolectric.shadows.androidx.fragment;
23 import androidx.fragment.app.Fragment;
24 import androidx.fragment.app.FragmentActivity;
37 private FragmentController(F fragment, Class<? extends FragmentActivity> activityClass) { in FragmentController() argument
38 this(fragment, activityClass, null /*intent*/, null /*arguments*/); in FragmentController()
42 F fragment, Class<? extends FragmentActivity> activityClass, Intent intent) { in FragmentController() argument
43 this(fragment, activityClass, intent, null /*arguments*/); in FragmentController()
47 F fragment, Class<? extends FragmentActivity> activityClass, Bundle arguments) { in FragmentController() argument
48 this(fragment, activityClass, null /*intent*/, arguments); in FragmentController()
52 F fragment, in FragmentController() argument
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/lifecycle/
DLifecycleTest.java47 import org.robolectric.shadows.androidx.fragment.FragmentController;
186 final TestDialogFragment fragment = new TestDialogFragment(); in runThroughDialogFragmentLifecycles_shouldObserveEverything() local
187 FragmentController.setupFragment(fragment); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
189 fragment.onCreateOptionsMenu(null, null); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
190 fragment.onPrepareOptionsMenu(null); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
191 fragment.onOptionsItemSelected(null); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
192 assertThat(fragment.mFragObserver.mOnCreateOptionsMenuObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
193 assertThat(fragment.mFragObserver.mOnPrepareOptionsMenuObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
194 assertThat(fragment.mFragObserver.mOnOptionsItemSelectedObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
196 assertThat(fragment.mFragObserver.mOnAttachObserved).isTrue(); in runThroughDialogFragmentLifecycles_shouldObserveEverything()
[all …]
/frameworks/opt/photoviewer/src/com/android/ex/photo/adapters/
DBaseFragmentPagerAdapter.java21 import androidx.fragment.app.Fragment;
22 import androidx.fragment.app.FragmentManager;
23 import androidx.fragment.app.FragmentTransaction;
57 public BaseFragmentPagerAdapter(androidx.fragment.app.FragmentManager fm) { in BaseFragmentPagerAdapter()
82 Fragment fragment = mFragmentManager.findFragmentByTag(name); in instantiateItem() local
83 if (fragment != null) { in instantiateItem()
84 if (DEBUG) Log.v(TAG, "Attaching item #" + position + ": f=" + fragment); in instantiateItem()
85 mCurTransaction.attach(fragment); in instantiateItem()
87 fragment = getItem(position); in instantiateItem()
88 if(fragment == null) { in instantiateItem()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/fragment/
DCollapsedStatusBarFragmentTest.java15 package com.android.systemui.statusbar.phone.fragment;
68 import com.android.systemui.statusbar.phone.fragment.dagger.StatusBarFragmentComponent;
161 CollapsedStatusBarFragment fragment = resumeAndGetFragment(); in testDisableNone() local
163 fragment.disable(DEFAULT_DISPLAY, 0, 0, false); in testDisableNone()
171 CollapsedStatusBarFragment fragment = resumeAndGetFragment(); in testDisableSystemInfo_systemAnimationIdle_doesHide() local
173 fragment.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_SYSTEM_INFO, 0, false); in testDisableSystemInfo_systemAnimationIdle_doesHide()
177 fragment.disable(DEFAULT_DISPLAY, 0, 0, false); in testDisableSystemInfo_systemAnimationIdle_doesHide()
181 fragment.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_SYSTEM_INFO, 0, false); in testDisableSystemInfo_systemAnimationIdle_doesHide()
189 CollapsedStatusBarFragment fragment = resumeAndGetFragment(); in testSystemStatusAnimation_startedDisabled_finishedWithAnimator_showsSystemInfo() local
190 fragment.disable(DEFAULT_DISPLAY, StatusBarManager.DISABLE_SYSTEM_INFO, 0, false); in testSystemStatusAnimation_startedDisabled_finishedWithAnimator_showsSystemInfo()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/
DLifecycleFragmentTest.java53 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testCreateLifecycle() local
55 fragment.getLifecycle().addObserver(observer); in testCreateLifecycle()
60 verify(observer).onStateChanged(eq(fragment), eq(ON_CREATE)); in testCreateLifecycle()
65 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testResumeLifecycle() local
67 fragment.getLifecycle().addObserver(observer); in testResumeLifecycle()
72 verify(observer).onStateChanged(eq(fragment), eq(ON_RESUME)); in testResumeLifecycle()
77 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testStartLifecycle() local
79 fragment.getLifecycle().addObserver(observer); in testStartLifecycle()
84 verify(observer).onStateChanged(eq(fragment), eq(ON_START)); in testStartLifecycle()
89 LifecycleFragment fragment = (LifecycleFragment) mFragment; in testStopLifecycle() local
[all …]
/frameworks/base/core/java/android/app/
DBackStackRecord.java60 mOps[pos++] = op.fragment != null ? op.fragment.mIndex : -1; in BackStackState()
108 op.fragment = f; in instantiate()
110 op.fragment = null; in instantiate()
192 Fragment fragment; field in BackStackRecord.Op
201 Op(int cmd, Fragment fragment) { in Op() argument
203 this.fragment = fragment; in Op()
348 writer.println(op.fragment); in dump()
408 public FragmentTransaction add(Fragment fragment, String tag) { in add() argument
409 doAddOp(0, fragment, tag, OP_ADD); in add()
413 public FragmentTransaction add(int containerViewId, Fragment fragment) { in add() argument
[all …]
DFragmentTransaction.java33 public abstract FragmentTransaction add(Fragment fragment, String tag); in add() argument
38 public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment); in add() argument
55 public abstract FragmentTransaction add(@IdRes int containerViewId, Fragment fragment, in add() argument
61 public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment); in replace() argument
79 public abstract FragmentTransaction replace(@IdRes int containerViewId, Fragment fragment, in replace() argument
90 public abstract FragmentTransaction remove(Fragment fragment); in remove() argument
101 public abstract FragmentTransaction hide(Fragment fragment); in hide() argument
112 public abstract FragmentTransaction show(Fragment fragment); in show() argument
125 public abstract FragmentTransaction detach(Fragment fragment); in detach() argument
137 public abstract FragmentTransaction attach(Fragment fragment); in attach() argument
[all …]
DFragmentManager.java317 public abstract void putFragment(Bundle bundle, String key, Fragment fragment); in putFragment() argument
928 public void putFragment(Bundle bundle, String key, Fragment fragment) { in putFragment() argument
929 if (fragment.mIndex < 0) { in putFragment()
930 throwException(new IllegalStateException("Fragment " + fragment in putFragment()
933 bundle.putInt(key, fragment.mIndex); in putFragment()
961 public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) { in saveFragmentInstanceState() argument
962 if (fragment.mIndex < 0) { in saveFragmentInstanceState()
963 throwException(new IllegalStateException("Fragment " + fragment in saveFragmentInstanceState()
966 if (fragment.mState > Fragment.INITIALIZING) { in saveFragmentInstanceState()
967 Bundle result = saveFragmentBasicState(fragment); in saveFragmentInstanceState()
[all …]
DFragmentTransition.java1103 Fragment fragment, ArrayList<View> sharedElements, View nonExistentView) { in configureEnteringExitingViews() argument
1107 View root = fragment.getView(); in configureEnteringExitingViews()
1249 final Fragment fragment = op.fragment; in addToFirstInLastOut() local
1250 if (fragment == null) { in addToFirstInLastOut()
1253 final int containerId = fragment.mContainerId; in addToFirstInLastOut()
1265 setLastIn = fragment.mHiddenChanged && !fragment.mHidden && in addToFirstInLastOut()
1266 fragment.mAdded; in addToFirstInLastOut()
1268 setLastIn = fragment.mHidden; in addToFirstInLastOut()
1275 setLastIn = fragment.mIsNewlyAdded; in addToFirstInLastOut()
1277 setLastIn = !fragment.mAdded && !fragment.mHidden; in addToFirstInLastOut()
[all …]
/frameworks/base/boot/
DAndroid.bp67 module: "com.android.adservices-bootclasspath-fragment",
71 module: "com.android.appsearch-bootclasspath-fragment",
75 module: "art-bootclasspath-fragment",
79 module: "com.android.btservices-bootclasspath-fragment",
83 module: "com.android.configinfrastructure-bootclasspath-fragment",
87 module: "com.android.conscrypt-bootclasspath-fragment",
91 module: "com.android.devicelock-bootclasspath-fragment",
95 module: "com.android.healthfitness-bootclasspath-fragment",
99 module: "i18n-bootclasspath-fragment",
103 module: "com.android.ipsec-bootclasspath-fragment",
[all …]
/frameworks/base/tests/UiBench/src/com/android/test/uibench/listview/
DCompatListActivity.java22 import androidx.fragment.app.Fragment;
23 import androidx.fragment.app.FragmentManager;
24 import androidx.fragment.app.ListFragment;
35 Fragment fragment = fm.findFragmentById(containerViewId); in onCreate() local
36 if (fragment == null) { in onCreate()
40 } else if (fragment instanceof ListFragment) { in onCreate()
41 ((ListFragment) fragment).setListAdapter(createListAdapter()); in onCreate()
/frameworks/base/tests/UiBench/src/com/android/test/uibench/recyclerview/
DRvCompatListActivity.java26 import androidx.fragment.app.Fragment;
27 import androidx.fragment.app.FragmentManager;
57 RecyclerViewFragment fragment = new RecyclerViewFragment(); in onCreate() local
58 initializeRecyclerViewFragment(fragment); in onCreate()
59 fm.beginTransaction().add(android.R.id.content, fragment).commit(); in onCreate()
65 private void initializeRecyclerViewFragment(RecyclerViewFragment fragment) { in initializeRecyclerViewFragment() argument
66 fragment.layoutManager = createLayoutManager(this); in initializeRecyclerViewFragment()
67 fragment.adapter = createAdapter(); in initializeRecyclerViewFragment()
/frameworks/opt/photoviewer/src/com/android/ex/photo/
DPhotoViewCallbacks.java5 import androidx.fragment.app.Fragment;
82 public void onFragmentPhotoLoadComplete(PhotoViewFragment fragment, in onFragmentPhotoLoadComplete() argument
87 public boolean isFragmentActive(Fragment fragment); in isFragmentActive() argument
89 public void onFragmentVisible(PhotoViewFragment fragment); in onFragmentVisible() argument
91 public boolean isFragmentFullScreen(Fragment fragment); in isFragmentFullScreen() argument
93 public void onCursorChanged(PhotoViewFragment fragment, Cursor cursor); in onCursorChanged() argument
/frameworks/base/core/java/android/util/proto/
DProtoInputStream.java607 final int fragment = mEnd - mOffset; in readVarint() local
608 if (fragment < 0) { in readVarint()
614 for (int i = 0; i < fragment; i++) { in readVarint()
630 incOffset(fragment); in readVarint()
658 int fragment = (mEnd - mOffset) < bytesLeft ? (mEnd - mOffset) : bytesLeft; in readFixed32() local
659 if (fragment < 0) { in readFixed32()
665 incOffset(fragment); in readFixed32()
666 bytesLeft -= fragment; in readFixed32()
667 while (fragment > 0) { in readFixed32()
668 value |= ((mBuffer[mOffset - fragment] & 0xFF) << shift); in readFixed32()
[all …]
/frameworks/base/packages/SettingsLib/ProfileSelector/src/com/android/settingslib/widget/
DProfileViewPagerAdapter.java19 import androidx.fragment.app.Fragment;
29 ProfileViewPagerAdapter(ProfileSelectFragment fragment) { in ProfileViewPagerAdapter() argument
30 super(fragment); in ProfileViewPagerAdapter()
31 mParentFragments = fragment; in ProfileViewPagerAdapter()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/inputmethod/
DInputMethodAndSubtypeEnablerManagerCompat.java54 public InputMethodAndSubtypeEnablerManagerCompat(PreferenceFragmentCompat fragment) { in InputMethodAndSubtypeEnablerManagerCompat() argument
55 mFragment = fragment; in InputMethodAndSubtypeEnablerManagerCompat()
56 mImm = fragment.getContext().getSystemService(InputMethodManager.class); in InputMethodAndSubtypeEnablerManagerCompat()
61 public void init(PreferenceFragmentCompat fragment, String targetImi, PreferenceScreen root) { in init() argument
62 final Configuration config = fragment.getResources().getConfiguration(); in init()
68 addInputMethodSubtypePreferences(fragment, imi, root); in init()
73 public void refresh(Context context, PreferenceFragmentCompat fragment) { in refresh() argument
78 InputMethodAndSubtypeUtilCompat.loadInputMethodSubtypeList(fragment, in refresh()
83 public void save(Context context, PreferenceFragmentCompat fragment) { in save() argument
84 InputMethodAndSubtypeUtilCompat.saveInputMethodSubtypeList(fragment, in save()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DTunerActivity.java78 final PreferenceFragment fragment = showDemoMode in onCreate() local
82 fragment, TAG_TUNER).commit(); in onCreate()
112 Fragment fragment = (Fragment) cls.newInstance(); in onPreferenceStartFragment() local
115 fragment.setArguments(b); in onPreferenceStartFragment()
118 transaction.replace(R.id.content_frame, fragment); in onPreferenceStartFragment()
131 SubSettingsFragment fragment = new SubSettingsFragment(); in onPreferenceStartScreen() local
134 fragment.setArguments(b); in onPreferenceStartScreen()
135 fragment.setTargetFragment(caller, 0); in onPreferenceStartScreen()
136 transaction.replace(R.id.content_frame, fragment); in onPreferenceStartScreen()
/frameworks/base/packages/SettingsLib/tests/robotests/fragment/
DBUILD15 custom_package = "org.robolectric.shadows.androidx.fragment",
23 # AndroidX fragment module library
31 custom_package = "org.robolectric.shadows.androidx.fragment",
33 … "-Aorg.robolectric.annotation.processing.shadowPackage=org.robolectric.shadows.androidx.fragment",
41 "//third_party/java/androidx/fragment",
59 "//third_party/java/androidx/fragment",
/frameworks/base/packages/SettingsLib/tests/robotests/fragment/src/test/java/org/robolectric/shadows/androidx/fragment/
DFragmentControllerTest.java17 package org.robolectric.shadows.androidx.fragment;
33 import androidx.fragment.app.Fragment;
34 import androidx.fragment.app.FragmentActivity;
229 TranscriptFragment fragment = FragmentController.setupFragment(new TranscriptFragment()); in setupFragmentWithFragment_fragmentHasCorrectLifecycle() local
231 assertThat(fragment.getLifecycleEvents()) in setupFragmentWithFragment_fragmentHasCorrectLifecycle()
234 assertThat(fragment.isVisible()).isTrue(); in setupFragmentWithFragment_fragmentHasCorrectLifecycle()
239 TranscriptFragment fragment = in setupFragmentWithFragmentAndActivity_fragmentHasCorrectLifecycle() local
242 assertThat(fragment.getLifecycleEvents()) in setupFragmentWithFragmentAndActivity_fragmentHasCorrectLifecycle()
245 assertThat(fragment.isVisible()).isTrue(); in setupFragmentWithFragmentAndActivity_fragmentHasCorrectLifecycle()
251 TranscriptFragment fragment = in setupFragmentWithFragmentAndActivityAndBundle_HasCorrectLifecycle() local
[all …]
/frameworks/base/core/java/android/net/
DUri.java705 private Part fragment; field in Uri.StringUri
708 return fragment == null in getFragmentPart()
709 ? fragment = Part.fromEncoded(parseFragment()) : fragment; in getFragmentPart()
828 .fragment(getFragmentPart()); in buildUpon()
833 .fragment(getFragmentPart()); in buildUpon()
855 String fragment) { in fromParts() argument
864 Part.fromDecoded(fragment)); in fromParts()
877 private final Part fragment; field in Uri.OpaqueUri
879 private OpaqueUri(String scheme, Part ssp, Part fragment) { in OpaqueUri() argument
882 this.fragment = fragment == null ? Part.NULL : fragment; in OpaqueUri()
[all …]
/frameworks/opt/car/setupwizard/library/main/tests/robotests/src/com/android/car/setupwizardlib/
DBaseCompatActivityTest.java41 import androidx.fragment.app.Fragment;
193 Fragment fragment = new Fragment(); in testSetContentFragmentWhenFragmentCommitsAllowed() local
194 spyBaseCompatActivity.setContentFragment(fragment); in testSetContentFragmentWhenFragmentCommitsAllowed()
196 assertThat(spyBaseCompatActivity.getContentFragment()).isEqualTo(fragment); in testSetContentFragmentWhenFragmentCommitsAllowed()
200 verify(spyBaseCompatActivity).onContentFragmentSet(fragment); in testSetContentFragmentWhenFragmentCommitsAllowed()
213 Fragment fragment = new Fragment(); in testSetContentFragmentWhenFragmentCommitsNotAllowed() local
214 spyBaseCompatActivity.setContentFragment(fragment); in testSetContentFragmentWhenFragmentCommitsNotAllowed()
220 verify(spyBaseCompatActivity, times(0)).onContentFragmentSet(fragment); in testSetContentFragmentWhenFragmentCommitsNotAllowed()
233 Fragment fragment = new Fragment(); in testSetContentFragmentWithBackstackWhenFragmentCommitsAllowed() local
234 spyBaseCompatActivity.setContentFragmentWithBackstack(fragment); in testSetContentFragmentWithBackstackWhenFragmentCommitsAllowed()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/core/
DStatusBarInitializer.kt25 import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment in <lambda>()
26 import com.android.systemui.statusbar.phone.fragment.dagger.StatusBarFragmentComponent in <lambda>()
54 override fun onFragmentViewCreated(tag: String, fragment: Fragment) { in <lambda>()
55 val statusBarFragmentComponent = (fragment as CollapsedStatusBarFragment) in <lambda>()
67 override fun onFragmentViewDestroyed(tag: String?, fragment: Fragment?) { in <lambda>()
/frameworks/av/media/libstagefright/rtsp/
DARTSPConnection.cpp987 AString fragment; in addAuthentication() local
988 fragment.append("Authorization: Basic "); in addAuthentication()
989 fragment.append(out); in addAuthentication()
990 fragment.append("\r\n"); in addAuthentication()
992 request->insert(fragment, i + 2); in addAuthentication()
1028 AString fragment; in addAuthentication() local
1029 fragment.append("Authorization: Digest "); in addAuthentication()
1030 fragment.append("nonce=\""); in addAuthentication()
1031 fragment.append(mNonce); in addAuthentication()
1032 fragment.append("\", "); in addAuthentication()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DCustomDialogPreference.java82 private void setFragment(CustomPreferenceDialogFragment fragment) { in setFragment() argument
83 mFragment = fragment; in setFragment()
93 final CustomPreferenceDialogFragment fragment = new CustomPreferenceDialogFragment(); in newInstance() local
96 fragment.setArguments(b); in newInstance()
97 return fragment; in newInstance()
DCustomDialogPreferenceCompat.java76 private void setFragment(CustomPreferenceDialogFragment fragment) { in setFragment() argument
77 mFragment = fragment; in setFragment()
87 final CustomPreferenceDialogFragment fragment = new CustomPreferenceDialogFragment(); in newInstance() local
90 fragment.setArguments(b); in newInstance()
91 return fragment; in newInstance()

1234567