Merge "Create NetworkProviderSettings for provider model"

This commit is contained in:
TreeHugger Robot
2020-09-18 05:08:08 +00:00
committed by Android (Google) Code Review
8 changed files with 1614 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ import com.android.settings.wifi.dpp.WifiDppUtils;
public class AddNetworkFragment extends InstrumentedFragment implements WifiConfigUiBase2,
View.OnClickListener {
final static String WIFI_CONFIG_KEY = "wifi_config_key";
public static final String WIFI_CONFIG_KEY = "wifi_config_key";
@VisibleForTesting
final static int SUBMIT_BUTTON_ID = android.R.id.button1;
@VisibleForTesting

View File

@@ -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);