Fix the CtsVerifier issue

- The "android.settings.WIFI_SETTINGS" intent-filter needs to be the
first element of the intent-filter in the activity for profile intent
filters

- Redirect the "android.settings.WIFI_SETTINGS" action to Internet
Settings via FRAGMENT_CLASS meta-data

- Add PRIMARY_PROFILE_CONTROLLED meta-data to WifiSettings2Activity

- Remove unnecessary WifiSettings2Activity from Settings.java

Bug: 205258444
Test: manual test
- Long press the Internet Tile in QS for WIFI_SETTINGS action testing
- Use adb command to test the shortcut action
adb shell am start com.android.settings/.Settings\\\$WifiSettings2Activity

Change-Id: I9ac397828edf1083efcf790eb41b3e978ed6bdca
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e4e1a10..afaf046 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -305,12 +305,16 @@
             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" />
+                       android:value="com.android.settings.network.NetworkProviderSettings"/>
             <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
-                android:value="@string/menu_key_network"/>
+                       android:value="@string/menu_key_network"/>
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                android:value="true" />
+                       android:value="true"/>
         </activity>
 
         <!-- Keep compatibility with old shortcuts. -->
@@ -321,9 +325,11 @@
             android:icon="@drawable/ic_homepage_network"
             android:exported="true">
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                android:value="com.android.settings.wifi.WifiSettings" />
+                       android:value="com.android.settings.network.NetworkProviderSettings"/>
             <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
-                android:value="@string/menu_key_network"/>
+                       android:value="@string/menu_key_network"/>
+            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+                       android:value="true"/>
         </activity-alias>
 
         <activity
@@ -333,23 +339,19 @@
             android:exported="true"
             android:configChanges="orientation|keyboardHidden|screenSize">
             <intent-filter android:priority="1">
-                <action android:name="android.settings.NETWORK_PROVIDER_SETTINGS" />
-                <category android:name="android.intent.category.DEFAULT" />
+                <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" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="com.android.settings.SHORTCUT"/>
             </intent-filter>
             <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
-                android:value="com.android.settings.network.NetworkProviderSettings" />
+                       android:value="com.android.settings.network.NetworkProviderSettings"/>
             <meta-data android:name="com.android.settings.HIGHLIGHT_MENU_KEY"
-                android:value="@string/menu_key_network"/>
+                       android:value="@string/menu_key_network"/>
             <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
-                android:value="true" />
+                       android:value="true"/>
         </activity>
 
         <activity