Create NetworkProviderSettings for provider model
Provider model is a feature which improves networks Settings UX. NetworkProviderSettings is the fragment which allow users to choose a mobile network or a Wi-Fi network to connect. At this change, NetworkProviderSettings is a clone of WifiSettings, mobile networks will be integrated at later CLs. Bug: 167474581 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.network.NetworkProviderSettingsTest Change-Id: I185639a8f2469e9ec76ad18b6c2bc2e8a4d079e3
This commit is contained in:
@@ -88,6 +88,9 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* UI for Wi-Fi settings screen
|
||||
*
|
||||
* TODO(b/167474581): This file will be deprecated at Android S, please merge your WifiSettings
|
||||
* in change in {@link NetworkProviderSettings}.
|
||||
*/
|
||||
@SearchIndexable
|
||||
public class WifiSettings extends RestrictedSettingsFragment
|
||||
@@ -228,6 +231,17 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlagUtils.SETTINGS_PROVIDER_MODEL)) {
|
||||
final Intent intent = new Intent("android.settings.NETWORK_PROVIDER_SETTINGS");
|
||||
final Bundle extras = getActivity().getIntent().getExtras();
|
||||
if (extras != null) {
|
||||
intent.putExtras(extras);
|
||||
}
|
||||
getContext().startActivity(intent);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO(b/37429702): Add animations and preference comparator back after initial screen is
|
||||
// loaded (ODR).
|
||||
setAnimationAllowed(false);
|
||||
|
Reference in New Issue
Block a user