Merge "Added WifiSettings -> WifiSettings2 redirection behind feature flag"

This commit is contained in:
Quang Luong
2019-07-24 21:59:02 +00:00
committed by Android (Google) Code Review
6 changed files with 66 additions and 0 deletions

View File

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

View 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;
}
}