Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 929e577e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move android.settings.WIFI_SETTINGS action to Internet Settings" into sc-v2-dev

parents 3d353e63 3b99a81e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -292,10 +292,6 @@
            android:icon="@drawable/ic_homepage_network"
            android:exported="true"
            android:configChanges="orientation|keyboardHidden|screenSize">
            <intent-filter android:priority="1">
                <action android:name="android.settings.WIFI_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.wifi.WifiSettings" />
            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
@@ -312,6 +308,10 @@
                <action android:name="android.settings.NETWORK_PROVIDER_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="1">
                <action android:name="android.settings.WIFI_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter android:priority="1">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="com.android.settings.SHORTCUT" />
+16 −1
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package com.android.settings.network;
import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NETWORK_SELECTION_ENABLED;
import static android.os.UserManager.DISALLOW_CONFIG_WIFI;

import static com.android.settings.Settings.WifiSettingsActivity;

import android.app.Activity;
import android.app.Dialog;
import android.app.settings.SettingsEnums;
@@ -278,6 +280,17 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        if (!FeatureFlagUtils.isEnabled(getContext(), FeatureFlagUtils.SETTINGS_PROVIDER_MODEL)) {
            final Intent intent = new Intent(getContext(), WifiSettingsActivity.class);
            final Bundle extras = getActivity().getIntent().getExtras();
            if (extras != null) {
                intent.putExtras(extras);
            }
            getContext().startActivity(intent);
            finish();
            return;
        }

        mAirplaneModeEnabler = new AirplaneModeEnabler(getContext(), this);

        // TODO(b/37429702): Add animations and preference comparator back after initial screen is
@@ -465,7 +478,9 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment

    @Override
    public void onDestroy() {
        if (mAirplaneModeEnabler != null) {
            mAirplaneModeEnabler.close();
        }
        super.onDestroy();
    }