Merge "Added WifiSettings -> WifiSettings2 redirection behind feature flag"
This commit is contained in:
@@ -43,6 +43,7 @@ public class Settings extends SettingsActivity {
|
||||
public static class PrivateVolumeSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class PublicVolumeSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class WifiSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class WifiSettings2Activity extends SettingsActivity { /* empty */ }
|
||||
public static class WifiP2pSettingsActivity extends SettingsActivity { /* empty */ }
|
||||
public static class AvailableVirtualKeyboardActivity extends SettingsActivity { /* empty */ }
|
||||
public static class KeyboardLayoutPickerActivity extends SettingsActivity { /* empty */ }
|
||||
|
||||
@@ -141,6 +141,7 @@ import com.android.settings.wifi.ConfigureWifiSettings;
|
||||
import com.android.settings.wifi.WifiAPITest;
|
||||
import com.android.settings.wifi.WifiInfo;
|
||||
import com.android.settings.wifi.WifiSettings;
|
||||
import com.android.settings.wifi.WifiSettings2;
|
||||
import com.android.settings.wifi.calling.WifiCallingDisclaimerFragment;
|
||||
import com.android.settings.wifi.calling.WifiCallingSettings;
|
||||
import com.android.settings.wifi.p2p.WifiP2pSettings;
|
||||
@@ -157,6 +158,7 @@ public class SettingsGateway {
|
||||
AdvancedConnectedDeviceDashboardFragment.class.getName(),
|
||||
CreateShortcut.class.getName(),
|
||||
WifiSettings.class.getName(),
|
||||
WifiSettings2.class.getName(),
|
||||
ConfigureWifiSettings.class.getName(),
|
||||
SavedAccessPointsWifiSettings.class.getName(),
|
||||
SimSettings.class.getName(),
|
||||
@@ -301,6 +303,7 @@ public class SettingsGateway {
|
||||
SupportDashboardActivity.class.getName(),
|
||||
// Home page > Network & Internet
|
||||
Settings.WifiSettingsActivity.class.getName(),
|
||||
Settings.WifiSettings2Activity.class.getName(),
|
||||
Settings.DataUsageSummaryActivity.class.getName(),
|
||||
// Home page > Connected devices
|
||||
Settings.BluetoothSettingsActivity.class.getName(),
|
||||
|
||||
@@ -224,6 +224,12 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
||||
if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlagUtils.SETTINGS_WIFITRACKER2)) {
|
||||
getContext().startActivity(new Intent("android.settings.WIFI_SETTINGS2"));
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO(b/37429702): Add animations and preference comparator back after initial screen is
|
||||
// loaded (ODR).
|
||||
setAnimationAllowed(false);
|
||||
|
||||
35
src/com/android/settings/wifi/WifiSettings2.java
Normal file
35
src/com/android/settings/wifi/WifiSettings2.java
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2019 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.settings.wifi;
|
||||
|
||||
import static android.os.UserManager.DISALLOW_CONFIG_WIFI;
|
||||
|
||||
import android.app.settings.SettingsEnums;
|
||||
|
||||
import com.android.settings.RestrictedSettingsFragment;
|
||||
|
||||
public class WifiSettings2 extends RestrictedSettingsFragment {
|
||||
|
||||
public WifiSettings2() {
|
||||
super(DISALLOW_CONFIG_WIFI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
return SettingsEnums.WIFI;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user