Home
last modified time | relevance | path

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

12345678910>>...47

/packages/apps/DeskClock/src/com/android/deskclock/
DFragmentTabPagerAdapter.java75 DeskClockFragment fragment = mFragmentCache.get(tab); in getDeskClockFragment() local
76 if (fragment != null) { in getDeskClockFragment()
77 return fragment; in getDeskClockFragment()
83 fragment = (DeskClockFragment) mFragmentManager.findFragmentByTag(tab.name()); in getDeskClockFragment()
84 if (fragment != null) { in getDeskClockFragment()
85 fragment.setFabContainer(mDeskClock); in getDeskClockFragment()
86 mFragmentCache.put(tab, fragment); in getDeskClockFragment()
87 return fragment; in getDeskClockFragment()
92 fragment = (DeskClockFragment) Fragment.instantiate(mDeskClock, fragmentClassName); in getDeskClockFragment()
93 fragment.setFabContainer(mDeskClock); in getDeskClockFragment()
[all …]
/packages/apps/Dialer/java/com/android/dialer/blockreportspam/
DBlockReportSpamDialogs.java42 Activity activity, final DialogFragment fragment) { in createDialogBuilder() argument
45 .setNegativeButton(android.R.string.cancel, (dialog, which) -> fragment.dismiss()); in createDialogBuilder()
53 final DialogFragment fragment, final OnConfirmListener listener) { in createGenericOnClickListener() argument
55 fragment.dismiss(); in createGenericOnClickListener()
142 DialogFragmentForBlockingNumberAndOptionallyReportingAsSpam fragment = in newInstance() local
144 fragment.spamChecked = spamChecked; in newInstance()
145 fragment.displayNumber = displayNumber; in newInstance()
146 fragment.onSpamDialogClickListener = onSpamDialogClickListener; in newInstance()
147 fragment.dismissListener = dismissListener; in newInstance()
148 return fragment; in newInstance()
[all …]
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/wifi/dpp/
DWifiDppConfiguratorActivity.java31 import androidx.fragment.app.Fragment;
32 import androidx.fragment.app.FragmentManager;
33 import androidx.fragment.app.FragmentTransaction;
182 WifiDppQrCodeScannerFragment fragment = in showQrCodeScannerFragment() local
186 if (fragment == null) { in showQrCodeScannerFragment()
187 fragment = new WifiDppQrCodeScannerFragment(); in showQrCodeScannerFragment()
189 if (fragment.isVisible()) { in showQrCodeScannerFragment()
200 fragmentTransaction.replace(R.id.fragment_container, fragment, in showQrCodeScannerFragment()
209 WifiDppQrCodeGeneratorFragment fragment = in showQrCodeGeneratorFragment() local
213 if (fragment == null) { in showQrCodeGeneratorFragment()
[all …]
/packages/apps/Dialer/java/com/android/dialer/common/
DFragmentUtils.java42 public static <T> T getParent(@NonNull Fragment fragment, @NonNull Class<T> callbackInterface) { in getParent() argument
49 Fragment parentFragment = fragment.getParentFragment(); in getParent()
54 } else if (callbackInterface.isInstance(fragment.getActivity())) { in getParent()
56 T parent = (T) fragment.getActivity(); in getParent()
58 } else if (fragment.getActivity() instanceof FragmentUtilListener) { in getParent()
60 T parent = ((FragmentUtilListener) fragment.getActivity()).getImpl(callbackInterface); in getParent()
62 } else if (fragment.getActivity() instanceof MainActivityPeer.PeerSupplier) { in getParent()
63 MainActivityPeer peer = ((MainActivityPeer.PeerSupplier) fragment.getActivity()).getPeer(); in getParent()
78 @NonNull android.app.Fragment fragment, @NonNull Class<T> callbackInterface) { in getParent()
85 android.app.Fragment parentFragment = fragment.getParentFragment(); in getParent()
[all …]
/packages/apps/DeskClock/src/com/android/deskclock/timer/
DTimerPagerAdapter.kt57 val fragment = any as TimerItemFragment in getItemPosition() constant
58 val timer = fragment.timer in getItemPosition()
74 var fragment = mFragmentManager.findFragmentByTag(tag) as TimerItemFragment? in instantiateItem() variable
76 if (fragment != null) { in instantiateItem()
78 mCurrentTransaction!!.attach(fragment) in instantiateItem()
81 fragment = TimerItemFragment.newInstance(timer) in instantiateItem()
82 mCurrentTransaction!!.add(container.id, fragment, tag) in instantiateItem()
85 if (fragment !== mCurrentPrimaryItem) { in instantiateItem()
86 setItemVisible(fragment, false) in instantiateItem()
89 mFragments[timer.id] = fragment in instantiateItem()
[all …]
DTimerPagerAdapter.java68 final TimerItemFragment fragment = (TimerItemFragment) object; in getItemPosition() local
69 final Timer timer = fragment.getTimer(); in getItemPosition()
86 TimerItemFragment fragment = (TimerItemFragment) mFragmentManager.findFragmentByTag(tag); in instantiateItem() local
88 if (fragment != null) { in instantiateItem()
90 mCurrentTransaction.attach(fragment); in instantiateItem()
93 fragment = TimerItemFragment.newInstance(timer); in instantiateItem()
94 mCurrentTransaction.add(container.getId(), fragment, tag); in instantiateItem() local
97 if (fragment != mCurrentPrimaryItem) { in instantiateItem()
98 setItemVisible(fragment, false); in instantiateItem()
101 mFragments.put(timer.getId(), fragment); in instantiateItem() local
[all …]
/packages/apps/Car/libs/car-apps-common/src/com/android/car/apps/common/
DFragmentUtils.java23 import androidx.fragment.app.Fragment;
24 import androidx.fragment.app.FragmentActivity;
48 public static <T> T getParent(@NonNull Fragment fragment, @NonNull Class<T> parentType) { in getParent() argument
55 Fragment parentFragment = fragment.getParentFragment(); in getParent()
62 FragmentActivity activity = fragment.getActivity(); in getParent()
78 public static <T> T requireParent(@NonNull Fragment fragment, @NonNull Class<T> parentType) { in requireParent() argument
79 return Objects.requireNonNull(getParent(fragment, parentType)); in requireParent()
89 public static void checkParent(@NonNull Fragment fragment, @NonNull Class<?> parentType) in checkParent() argument
94 if (FragmentUtils.getParent(fragment, parentType) != null) { in checkParent()
98 if (fragment.getParentFragment() == null) { in checkParent()
[all …]
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/activity/
DAssociationActivity.java33 import androidx.fragment.app.DialogFragment;
34 import androidx.fragment.app.Fragment;
35 import androidx.fragment.app.FragmentActivity;
169 TurnOnBluetoothFragment fragment = new TurnOnBluetoothFragment(); in showTurnOnBluetoothFragment() local
171 launchFragment(fragment, TURN_ON_BLUETOOTH_FRAGMENT_TAG); in showTurnOnBluetoothFragment()
175 AddAssociatedDeviceFragment fragment = AddAssociatedDeviceFragment.newInstance(deviceName); in showAddAssociatedDeviceFragment() local
176 launchFragment(fragment, ADD_DEVICE_FRAGMENT_TAG); in showAddAssociatedDeviceFragment()
181 ConfirmPairingCodeFragment fragment = ConfirmPairingCodeFragment.newInstance(pairingCode); in showConfirmPairingCodeFragment() local
182 launchFragment(fragment, PAIRING_CODE_FRAGMENT_TAG); in showConfirmPairingCodeFragment()
190 AssociationErrorFragment fragment = new AssociationErrorFragment(); in showAssociationErrorFragment() local
[all …]
/packages/apps/Settings/src/com/android/settings/wifi/dpp/
DWifiDppConfiguratorActivity.java31 import androidx.fragment.app.Fragment;
32 import androidx.fragment.app.FragmentManager;
33 import androidx.fragment.app.FragmentTransaction;
182 WifiDppQrCodeScannerFragment fragment = in showQrCodeScannerFragment() local
186 if (fragment == null) { in showQrCodeScannerFragment()
187 fragment = new WifiDppQrCodeScannerFragment(); in showQrCodeScannerFragment()
189 if (fragment.isVisible()) { in showQrCodeScannerFragment()
200 fragmentTransaction.replace(R.id.fragment_container, fragment, in showQrCodeScannerFragment()
209 WifiDppQrCodeGeneratorFragment fragment = in showQrCodeGeneratorFragment() local
213 if (fragment == null) { in showQrCodeGeneratorFragment()
[all …]
/packages/apps/Contacts/src/com/android/contacts/activities/
DContactSelectionActivity.java99 public void onAttachFragment(Fragment fragment) { in onAttachFragment() argument
100 if (fragment instanceof ContactEntryListFragment<?>) { in onAttachFragment()
101 mListFragment = (ContactEntryListFragment<?>) fragment; in onAttachFragment()
268 ContactPickerFragment fragment = new ContactPickerFragment(); in configureListFragment() local
269 fragment.setEditMode(true); in configureListFragment()
270 fragment.setDirectorySearchMode(DirectoryListLoader.SEARCH_MODE_NONE); in configureListFragment()
271 fragment.setCreateContactEnabled(!mRequest.isSearchMode()); in configureListFragment()
272 fragment.setListType(ListEvent.ListType.PICK_CONTACT); in configureListFragment()
273 mListFragment = fragment; in configureListFragment()
279 ContactPickerFragment fragment = new ContactPickerFragment(); in configureListFragment() local
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/security/
DSettingsScreenLockActivity.java24 import androidx.fragment.app.Fragment;
47 Fragment fragment; in getInitialFragment() local
50 fragment = new ChooseLockTypeFragment(); in getInitialFragment()
53 fragment = new ConfirmLockPatternFragment(); in getInitialFragment()
57 fragment = ConfirmLockPinPasswordFragment.newPinInstance(); in getInitialFragment()
61 fragment = ConfirmLockPinPasswordFragment.newPasswordInstance(); in getInitialFragment()
65 fragment = ConfirmLockPinPasswordFragment.newPasswordInstance(); in getInitialFragment()
68 Bundle bundle = fragment.getArguments(); in getInitialFragment()
73 fragment.setArguments(bundle); in getInitialFragment()
74 return fragment; in getInitialFragment()
[all …]
DConfirmPasswordFragmentFactory.java25 import androidx.fragment.app.Fragment;
45 Fragment fragment; in getFragment() local
53 fragment = new ConfirmLockPatternFragment(); in getFragment()
57 fragment = ConfirmLockPinPasswordFragment.newPinInstance(); in getFragment()
61 fragment = ConfirmLockPinPasswordFragment.newPasswordInstance(); in getFragment()
65 fragment = ConfirmLockPinPasswordFragment.newPasswordInstance(); in getFragment()
68 Bundle bundle = fragment.getArguments(); in getFragment()
73 fragment.setArguments(bundle); in getFragment()
74 return fragment; in getFragment()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/dialog/old/
DDialogFragment.java60 Fragment fragment = getContentFragment(); in performEntryTransition() local
61 if (fragment instanceof ContentFragment) { in performEntryTransition()
62 ContentFragment cf = (ContentFragment) fragment; in performEntryTransition()
142 protected void setContentFragment(Fragment fragment) { in setContentFragment() argument
143 FragmentTransaction ft = getContentFragmentTransaction(fragment); in setContentFragment()
152 protected void setActionFragment(Fragment fragment) { in setActionFragment() argument
153 setActionFragment(fragment, true); in setActionFragment()
162 protected void setActionFragment(Fragment fragment, boolean addToBackStack) { in setActionFragment() argument
163 FragmentTransaction ft = addActionFragmentToTransaction(fragment, null, addToBackStack, in setActionFragment()
204 private FragmentTransaction getContentFragmentTransaction(Fragment fragment) { in getContentFragmentTransaction() argument
[all …]
DDialogActivity.java317 protected void setContentFragment(Fragment fragment) { in setContentFragment() argument
318 getDialogFragment().setContentFragment(fragment); in setContentFragment()
326 protected void setActionFragment(Fragment fragment) { in setActionFragment() argument
327 getDialogFragment().setActionFragment(fragment); in setActionFragment()
336 protected void setActionFragment(Fragment fragment, boolean addToBackStack) { in setActionFragment() argument
337 getDialogFragment().setActionFragment(fragment, addToBackStack); in setActionFragment()
369 protected void setDialogFragment(DialogFragment fragment) { in setDialogFragment() argument
370 setDialogFragment(fragment, true); in setDialogFragment()
373 protected void setDialogFragment(DialogFragment fragment, boolean addToBackStack) { in setDialogFragment() argument
374 mDialogFragment = fragment; in setDialogFragment()
[all …]
/packages/apps/EmergencyInfo/tests/unit/src/com/android/emergency/preferences/
DEmergencyListPreferenceTest.java61 EditInfoFragment fragment = (EditInfoFragment) activity.getFragment(); in testSummary_organDonor() local
63 getEmergencyListPreference(fragment, PreferenceKeys.KEY_ORGAN_DONOR); in testSummary_organDonor()
73 EditInfoFragment fragment = (EditInfoFragment) activity.getFragment(); in testSummary_bloodType() local
75 getEmergencyListPreference(fragment, PreferenceKeys.KEY_BLOOD_TYPE); in testSummary_bloodType()
85 EditInfoFragment fragment = (EditInfoFragment) activity.getFragment(); in testTitle_organDonor() local
87 getEmergencyListPreference(fragment, PreferenceKeys.KEY_ORGAN_DONOR); in testTitle_organDonor()
96 EditInfoFragment fragment = (EditInfoFragment) activity.getFragment(); in testTitle_bloodType() local
98 getEmergencyListPreference(fragment, PreferenceKeys.KEY_BLOOD_TYPE); in testTitle_bloodType()
107 EditInfoFragment fragment = (EditInfoFragment) activity.getFragment(); in testProperties_organDonor() local
109 getEmergencyListPreference(fragment, PreferenceKeys.KEY_ORGAN_DONOR); in testProperties_organDonor()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DExternalSourcesDetailsTest.java158 final ExternalSourcesDetails fragment = new ExternalSourcesDetails(); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference() local
164 ReflectionHelpers.setField(fragment, "mSwitchPref", mSwitchPref); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
165 ReflectionHelpers.setField(fragment, "mPackageInfo", mPackageInfo); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
167 ReflectionHelpers.setField(fragment, "mUserManager", userManager); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
171 ReflectionHelpers.setField(fragment, "mAppBridge", appBridge); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
185 assertThat(fragment.refreshUi()).isTrue(); in refreshUi_userRestrictionsUnknownSources_disablesSwitchPreference()
197 final ExternalSourcesDetails fragment = new ExternalSourcesDetails(); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference() local
203 ReflectionHelpers.setField(fragment, "mSwitchPref", mSwitchPref); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference()
204 ReflectionHelpers.setField(fragment, "mPackageInfo", mPackageInfo); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference()
206 ReflectionHelpers.setField(fragment, "mUserManager", userManager); in refreshUi_userRestrictionsUnknownSourcesGlobally_disablesSwitchPreference()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/common/
DCarSettingActivity.java24 import androidx.fragment.app.Fragment;
25 import androidx.fragment.app.FragmentManager;
67 Fragment fragment = FragmentResolver.getFragmentForIntent(/* context= */ this, in onResume() local
69 launchIfDifferent(fragment); in onResume()
75 public void launchFragment(Fragment fragment) { in launchFragment() argument
78 if (fragment.getClass().getName().equals( in launchFragment()
88 super.launchFragment(fragment); in launchFragment()
104 Fragment fragment = FragmentResolver.getFragmentForIntent(/* context= */ this, in getInitialFragment() local
106 if (fragment == null || intentFromSettings(getIntent())) { in getInitialFragment()
108 fragment = getRootFragment(); in getInitialFragment()
[all …]
DBaseCarSettingsActivity.java30 import androidx.fragment.app.DialogFragment;
31 import androidx.fragment.app.Fragment;
32 import androidx.fragment.app.FragmentActivity;
33 import androidx.fragment.app.FragmentManager.OnBackStackChangedListener;
91 public void launchFragment(Fragment fragment) { in launchFragment() argument
92 if (fragment instanceof DialogFragment) { in launchFragment()
108 .replace(R.id.fragment_container, fragment, in launchFragment()
132 Fragment fragment = getSupportFragmentManager().findFragmentByTag(tag); in findDialogByTag() local
133 if (fragment instanceof DialogFragment) { in findDialogByTag()
134 return (DialogFragment) fragment; in findDialogByTag()
[all …]
/packages/apps/Dialer/java/com/android/dialer/app/list/
DOldSpeedDialFragment.java377 private final OldSpeedDialFragment fragment; field in OldSpeedDialFragment.ContactTileLoaderListener
380 ContactTileLoaderListener(OldSpeedDialFragment fragment, PhoneFavoritesTileAdapter adapter) { in ContactTileLoaderListener() argument
381 this.fragment = fragment; in ContactTileLoaderListener()
387 return ContactTileLoaderFactory.createStrequentPhoneOnlyLoader(fragment.getContext()); in onCreateLoader()
393 fragment.setEmptyViewVisibility(adapter.getCount() == 0); in onLoadFinished()
394 FragmentUtils.getParentUnsafe(fragment, HostInterface.class) in onLoadFinished()
404 private final OldSpeedDialFragment fragment; field in OldSpeedDialFragment.ContactTileAdapterListener
406 ContactTileAdapterListener(OldSpeedDialFragment fragment) { in ContactTileAdapterListener() argument
407 this.fragment = fragment; in ContactTileAdapterListener()
413 FragmentUtils.getParentUnsafe(fragment, OnPhoneNumberPickerActionListener.class) in onContactSelected()
[all …]
DDialtactsPagerAdapter.java114 final Fragment fragment = (Fragment) super.instantiateItem(container, position); in instantiateItem() local
115 if (fragment instanceof OldSpeedDialFragment) { in instantiateItem()
116 oldSpeedDialFragment = (OldSpeedDialFragment) fragment; in instantiateItem()
117 } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_HISTORY) { in instantiateItem()
118 callLogFragment = (CallLogFragment) fragment; in instantiateItem()
119 } else if (fragment instanceof ContactsFragment) { in instantiateItem()
120 contactsFragment = (ContactsFragment) fragment; in instantiateItem()
121 } else if (fragment instanceof CallLogFragment && position == TAB_INDEX_VOICEMAIL) { in instantiateItem()
122 voicemailFragment = (CallLogFragment) fragment; in instantiateItem()
125 fragments.set(position, fragment); in instantiateItem()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/common/
DTwoActionPreferenceTest.java99 TestSettingsFragment fragment = TestSettingsFragment.newInstance( in preferenceConstructed_attrDefined_actionShown() local
101 FragmentController.of(fragment).setup(); in preferenceConstructed_attrDefined_actionShown()
104 (TwoActionPreference) fragment.getPreferenceScreen().findPreference( in preferenceConstructed_attrDefined_actionShown()
112 TestSettingsFragment fragment = TestSettingsFragment.newInstance( in preferenceConstructed_defaultValue_actionShown() local
114 FragmentController.of(fragment).setup(); in preferenceConstructed_defaultValue_actionShown()
117 (TwoActionPreference) fragment.getPreferenceScreen().findPreference( in preferenceConstructed_defaultValue_actionShown()
125 TestSettingsFragment fragment = TestSettingsFragment.newInstance( in preferenceConstructed_attrDefined_actionHidden() local
127 FragmentController.of(fragment).setup(); in preferenceConstructed_attrDefined_actionHidden()
130 (TwoActionPreference) fragment.getPreferenceScreen().findPreference( in preferenceConstructed_attrDefined_actionHidden()
150 TestSettingsFragment fragment = new TestSettingsFragment(); in newInstance() local
[all …]
/packages/apps/Settings/src/com/android/settings/network/telephony/
DMobileNetworkActivity.java36 import androidx.fragment.app.Fragment;
37 import androidx.fragment.app.FragmentManager;
38 import androidx.fragment.app.FragmentTransaction;
269 void switchFragment(Fragment fragment, int subscriptionId) { in switchFragment() argument
270 switchFragment(fragment, subscriptionId, false /* forceUpdate */); in switchFragment()
274 void switchFragment(Fragment fragment, int subscriptionId, boolean forceUpdate) { in switchFragment() argument
284 fragment.setArguments(bundle); in switchFragment()
285 fragmentTransaction.replace(R.id.main_content, fragment, in switchFragment()
339 ContactDiscoveryDialogFragment fragment = getContactDiscoveryFragment(subId); in removeContactDiscoveryDialog() local
340 if (fragment != null) { in removeContactDiscoveryDialog()
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DStorageManagerUpsellDialogTest.java42 StorageManagerUpsellDialog fragment = StorageManagerUpsellDialog.newInstance(0); in testNoThanksMaximumShownTimes() local
43 fragment.setClock(mClock); in testNoThanksMaximumShownTimes()
48 startFragment(fragment); in testNoThanksMaximumShownTimes()
49 fragment.onClick(null, BUTTON_NEGATIVE); in testNoThanksMaximumShownTimes()
54 startFragment(fragment); in testNoThanksMaximumShownTimes()
55 fragment.onClick(null, BUTTON_NEGATIVE); in testNoThanksMaximumShownTimes()
60 startFragment(fragment); in testNoThanksMaximumShownTimes()
61 fragment.onClick(null, BUTTON_NEGATIVE); in testNoThanksMaximumShownTimes()
66 startFragment(fragment); in testNoThanksMaximumShownTimes()
67 fragment.onClick(null, BUTTON_NEGATIVE); in testNoThanksMaximumShownTimes()
/packages/apps/TV/common/src/com/android/tv/common/ui/setup/
DSetupActionHelper.java30 public static boolean onActionClick(Fragment fragment, String category, int actionId) { in onActionClick() argument
31 return onActionClick(fragment, category, actionId, null); in onActionClick()
36 Fragment fragment, String category, int actionId, Bundle params) { in onActionClick() argument
37 if (fragment.getActivity() instanceof OnActionClickListener) { in onActionClick()
38 return ((OnActionClickListener) fragment.getActivity()) in onActionClick()
55 Fragment fragment, String category, int actionId, Bundle params) { in createOnClickListenerForAction() argument
56 return new OnActionClickListenerForAction(fragment, category, actionId, params); in createOnClickListenerForAction()
72 Fragment fragment, String category, int actionId, Bundle params) { in OnActionClickListenerForAction() argument
73 mFragment = fragment; in OnActionClickListenerForAction()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/defaultapps/
DDefaultAppPickerFragment.java28 import androidx.fragment.app.DialogFragment;
29 import androidx.fragment.app.Fragment;
30 import androidx.fragment.app.FragmentActivity;
63 final DialogFragment fragment = in onRadioButtonClicked() local
65 fragment.show(activity.getSupportFragmentManager(), ConfirmationDialogFragment.TAG); in onRadioButtonClicked()
95 final ConfirmationDialogFragment fragment = new ConfirmationDialogFragment(); in newConfirmationDialogFragment() local
96 fragment.init(this, selectedKey, confirmationMessage); in newConfirmationDialogFragment()
97 return fragment; in newConfirmationDialogFragment()
148 final Fragment fragment = getTargetFragment(); in onClick() local
149 if (fragment instanceof DefaultAppPickerFragment) { in onClick()
[all …]

12345678910>>...47