use of androidx.fragment.app.FragmentManager in project android_packages_apps_Settings by omnirom.
the class SavedAccessPointsWifiSettings2Test method onCreate_shouldNewSavedNetworkTracker.
@Test
public void onCreate_shouldNewSavedNetworkTracker() {
mSettings = new TestFragment();
final FragmentManager fragmentManager = mActivity.getSupportFragmentManager();
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.add(mSettings, null);
fragmentTransaction.commit();
final Bundle bundle = new Bundle();
mSettings.onCreate(bundle);
assertThat(mSettings.mSavedNetworkTracker).isNotNull();
}
use of androidx.fragment.app.FragmentManager in project android_packages_apps_Settings by omnirom.
the class WifiDppChooseSavedWifiNetworkFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
// Embedded WifiNetworkListFragment as child fragment within
// WifiDppChooseSavedWifiNetworkFragment.
final FragmentManager fragmentManager = getChildFragmentManager();
final WifiNetworkListFragment fragment = new WifiNetworkListFragment();
final Bundle args = getArguments();
if (args != null) {
fragment.setArguments(args);
}
final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.wifi_network_list_container, fragment, TAG_FRAGMENT_WIFI_NETWORK_LIST);
fragmentTransaction.commit();
}
use of androidx.fragment.app.FragmentManager in project android_packages_apps_Settings by omnirom.
the class ClearAdbKeysWarningDialog method show.
public static void show(Fragment host) {
final FragmentManager manager = host.getActivity().getSupportFragmentManager();
if (manager.findFragmentByTag(TAG) == null) {
final ClearAdbKeysWarningDialog dialog = new ClearAdbKeysWarningDialog();
dialog.setTargetFragment(host, 0);
dialog.show(manager, TAG);
}
}
use of androidx.fragment.app.FragmentManager in project android_packages_apps_Settings by omnirom.
the class DisableLogPersistWarningDialog method show.
public static void show(LogPersistDialogHost host) {
if (!(host instanceof Fragment)) {
return;
}
final Fragment hostFragment = (Fragment) host;
final FragmentManager manager = hostFragment.getActivity().getSupportFragmentManager();
if (manager.findFragmentByTag(TAG) == null) {
final DisableLogPersistWarningDialog dialog = new DisableLogPersistWarningDialog();
dialog.setTargetFragment(hostFragment, 0);
dialog.show(manager, TAG);
}
}
use of androidx.fragment.app.FragmentManager in project android_packages_apps_Settings by omnirom.
the class EnableOemUnlockSettingWarningDialog method show.
public static void show(Fragment host) {
final FragmentManager manager = host.getActivity().getSupportFragmentManager();
if (manager.findFragmentByTag(TAG) == null) {
final EnableOemUnlockSettingWarningDialog dialog = new EnableOemUnlockSettingWarningDialog();
dialog.setTargetFragment(host, 0);
dialog.show(manager, TAG);
}
}
Aggregations