Merge "Redirect Wifi Panel to settings page" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
94291dfd2d
@@ -22,11 +22,15 @@ import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.util.FeatureFlagUtils;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.flags.Flags;
|
||||
|
||||
public class PanelFeatureProviderImpl implements PanelFeatureProvider {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public PanelContent getPanel(Context context, Bundle bundle) {
|
||||
if (context == null) {
|
||||
return null;
|
||||
@@ -48,7 +52,14 @@ public class PanelFeatureProviderImpl implements PanelFeatureProvider {
|
||||
case Settings.Panel.ACTION_NFC:
|
||||
return NfcPanel.create(context);
|
||||
case Settings.Panel.ACTION_WIFI:
|
||||
return WifiPanel.create(context);
|
||||
if (Flags.slicesRetirement()) {
|
||||
Intent wifiIntent = new Intent(Settings.ACTION_WIFI_SETTINGS);
|
||||
wifiIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(wifiIntent);
|
||||
return null;
|
||||
} else {
|
||||
return WifiPanel.create(context);
|
||||
}
|
||||
case Settings.Panel.ACTION_VOLUME:
|
||||
if (FeatureFlagUtils.isEnabled(context,
|
||||
FeatureFlagUtils.SETTINGS_VOLUME_PANEL_IN_SYSTEMUI)) {
|
||||
|
Reference in New Issue
Block a user