Merge "Remove feature flag for provider model in wifi settings" into sc-v2-dev am: 21967a6ff8
am: 4375590837
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16263228 Change-Id: Ie89df57dc909dd6e7272c799bfd390a476b2a4cd
This commit is contained in:
@@ -88,9 +88,10 @@ 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
|
||||
* @deprecated This file will be deprecated at Android S, please merge your WifiSettings
|
||||
* in change in {@link NetworkProviderSettings}.
|
||||
*/
|
||||
@Deprecated
|
||||
@SearchIndexable
|
||||
public class WifiSettings extends RestrictedSettingsFragment
|
||||
implements Indexable, WifiPickerTracker.WifiPickerTrackerCallback,
|
||||
@@ -98,6 +99,10 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
|
||||
private static final String TAG = "WifiSettings";
|
||||
|
||||
// Set the Provider Model is always enabled
|
||||
@VisibleForTesting
|
||||
static Boolean IS_ENABLED_PROVIDER_MODEL = true;
|
||||
|
||||
// IDs of context menu
|
||||
static final int MENU_ID_CONNECT = Menu.FIRST + 1;
|
||||
@VisibleForTesting
|
||||
@@ -231,7 +236,7 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
if (Utils.isProviderModelEnabled(getContext())) {
|
||||
if (IS_ENABLED_PROVIDER_MODEL) {
|
||||
final Intent intent = new Intent("android.settings.NETWORK_PROVIDER_SETTINGS");
|
||||
// Add FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TASK to avoid multiple
|
||||
// instances issue. (e.g. b/191956700)
|
||||
@@ -1070,7 +1075,7 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
new BaseSearchIndexProvider(R.xml.wifi_settings) {
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return !Utils.isProviderModelEnabled(context);
|
||||
return !IS_ENABLED_PROVIDER_MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -271,15 +271,9 @@ public class WifiSlice implements CustomSliceable {
|
||||
public Intent getIntent() {
|
||||
final String screenTitle = mContext.getText(R.string.wifi_settings).toString();
|
||||
final Uri contentUri = new Uri.Builder().appendPath(KEY_WIFI).build();
|
||||
final String className;
|
||||
final String key;
|
||||
if (Utils.isProviderModelEnabled(mContext)) {
|
||||
className = NetworkProviderSettings.class.getName();
|
||||
key = WifiSwitchPreferenceController.KEY;
|
||||
} else {
|
||||
className = WifiSettings.class.getName();
|
||||
key = KEY_WIFI;
|
||||
}
|
||||
final String className = NetworkProviderSettings.class.getName();
|
||||
final String key = WifiSwitchPreferenceController.KEY;
|
||||
|
||||
final Intent intent = SliceBuilderUtils.buildSearchResultPageIntent(mContext, className,
|
||||
key, screenTitle, SettingsEnums.DIALOG_WIFI_AP_EDIT, this)
|
||||
.setClassName(mContext.getPackageName(), SubSettings.class.getName())
|
||||
|
@@ -105,7 +105,7 @@ public class WifiSettingsTest {
|
||||
mWifiSettings.mConfigureWifiSettingsPreference = new Preference(mContext);
|
||||
mWifiSettings.mWifiPickerTracker = mMockWifiPickerTracker;
|
||||
mWifiSettings.mWifiManager = mWifiManager;
|
||||
FeatureFlagUtils.setEnabled(mContext, FeatureFlagUtils.SETTINGS_PROVIDER_MODEL, false);
|
||||
mWifiSettings.IS_ENABLED_PROVIDER_MODEL = false;
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user