Remove feature flag for provider model in wifi settings

Bug: 206338507
Test: manual test
Change-Id: I1ec83c94f801b489bcc716a6d78cbe7beab9638f
This commit is contained in:
changbetty
2021-11-16 11:02:51 +00:00
parent 2d529a4f5c
commit 39ebb7c9a8
3 changed files with 12 additions and 13 deletions

View File

@@ -89,9 +89,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,
@@ -99,6 +100,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
@@ -232,7 +237,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