Merge "Added WifiSettings -> WifiSettings2 redirection behind feature flag"
This commit is contained in:
@@ -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